3847 references to Vector128
GenerateDocumentationAndConfigFiles (60)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (60)
351else if (Vector128.IsHardwareAccelerated) 353Vector128.Store(Vector128.Load(stateAccumulators), accumulators); 354Vector128.Store(Vector128.Load(stateAccumulators + 2), accumulators + 2); 355Vector128.Store(Vector128.Load(stateAccumulators + 4), accumulators + 4); 356Vector128.Store(Vector128.Load(stateAccumulators + 6), accumulators + 6); 408else if (Vector128.IsHardwareAccelerated) 410Vector128.Store(Vector128.Create(Prime32_3, Prime64_1), accumulators); 411Vector128.Store(Vector128.Create(Prime64_2, Prime64_3), accumulators + 2); 412Vector128.Store(Vector128.Create(Prime64_4, Prime32_2), accumulators + 4); 413Vector128.Store(Vector128.Create(Prime64_5, Prime32_1), accumulators + 6); 500else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 502Vector128<ulong> seedVec = Vector128.Create(seed, 0u - seed); 505Vector128.Store(Vector128.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 559else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 561Vector128<ulong> acc1 = Vector128.Load(accumulators); 562Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 563Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 564Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 571Vector128<uint> secretVal = Vector128.Load((uint*)secret); 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 579secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 583secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 592acc1 = ScrambleAccumulator128(acc1, Vector128.Load((ulong*)secretForScramble)); 593acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 594acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 595acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 599Vector128.Store(acc1, accumulators); 600Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 601Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 602Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 645else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 649Vector128<ulong> accVec = Accumulate128(Vector128.Load(accumulators), source, Vector128.Load((uint*)secret)); 650Vector128.Store(accVec, accumulators); 693Vector128<uint> sourceVec = Vector128.Load((uint*)source); 697Vector128<uint> sourceSwap = Vector128.Shuffle(sourceVec, Vector128.Create(2u, 3, 0, 1)); 710Vector64<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(0u, 2, 0, 0)).GetLower(); 711Vector64<uint> sourceHigh = Vector128.Shuffle(source, Vector128.Create(1u, 3, 0, 0)).GetLower(); 716Vector128<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(1u, 0, 3, 0)); 719(source & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceLow & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64(); 738else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 742Vector128<ulong> accVec = ScrambleAccumulator128(Vector128.Load(accumulators), Vector128.Load((ulong*)secret)); 743Vector128.Store(accVec, accumulators); 777Vector128<ulong> xorShift = accVec ^ Vector128.ShiftRightLogical(accVec, 47); 779accVec = xorWithKey * Vector128.Create((ulong)Prime32_1);
Microsoft.AspNetCore.Razor.Utilities.Shared (60)
Utilities\Hashing\XxHashShared.cs (60)
350else if (Vector128.IsHardwareAccelerated) 352Vector128.Store(Vector128.Load(stateAccumulators), accumulators); 353Vector128.Store(Vector128.Load(stateAccumulators + 2), accumulators + 2); 354Vector128.Store(Vector128.Load(stateAccumulators + 4), accumulators + 4); 355Vector128.Store(Vector128.Load(stateAccumulators + 6), accumulators + 6); 407else if (Vector128.IsHardwareAccelerated) 409Vector128.Store(Vector128.Create(Prime32_3, Prime64_1), accumulators); 410Vector128.Store(Vector128.Create(Prime64_2, Prime64_3), accumulators + 2); 411Vector128.Store(Vector128.Create(Prime64_4, Prime32_2), accumulators + 4); 412Vector128.Store(Vector128.Create(Prime64_5, Prime32_1), accumulators + 6); 499else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 501Vector128<ulong> seedVec = Vector128.Create(seed, 0u - seed); 504Vector128.Store(Vector128.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 558else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 560Vector128<ulong> acc1 = Vector128.Load(accumulators); 561Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 562Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 563Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 570Vector128<uint> secretVal = Vector128.Load((uint*)secret); 574secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 578secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 582secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 591acc1 = ScrambleAccumulator128(acc1, Vector128.Load((ulong*)secretForScramble)); 592acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 593acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 594acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 598Vector128.Store(acc1, accumulators); 599Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 600Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 601Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 644else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 648Vector128<ulong> accVec = Accumulate128(Vector128.Load(accumulators), source, Vector128.Load((uint*)secret)); 649Vector128.Store(accVec, accumulators); 692Vector128<uint> sourceVec = Vector128.Load((uint*)source); 696Vector128<uint> sourceSwap = Vector128.Shuffle(sourceVec, Vector128.Create(2u, 3, 0, 1)); 709Vector64<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(0u, 2, 0, 0)).GetLower(); 710Vector64<uint> sourceHigh = Vector128.Shuffle(source, Vector128.Create(1u, 3, 0, 0)).GetLower(); 715Vector128<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(1u, 0, 3, 0)); 718(source & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceLow & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64(); 737else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 741Vector128<ulong> accVec = ScrambleAccumulator128(Vector128.Load(accumulators), Vector128.Load((ulong*)secret)); 742Vector128.Store(accVec, accumulators); 776Vector128<ulong> xorShift = accVec ^ Vector128.ShiftRightLogical(accVec, 47); 778accVec = xorWithKey * Vector128.Create((ulong)Prime32_1);
Microsoft.AspNetCore.Server.HttpSys (5)
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (5)
147var lowNibbles = Ssse3.Shuffle(Vector128.CreateScalarUnsafe(tupleNumber).AsByte(), Vector128.Create( 155var indices = Sse2.And(Sse2.Or(lowNibbles, highNibbles), Vector128.Create((byte)0xF)); 158var hex = Ssse3.Shuffle(Vector128.Create( 166hex = Sse2.And(hex, Vector128.Create((ushort)0xFF).AsByte());
Microsoft.AspNetCore.Server.IIS (5)
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (5)
147var lowNibbles = Ssse3.Shuffle(Vector128.CreateScalarUnsafe(tupleNumber).AsByte(), Vector128.Create( 155var indices = Sse2.And(Sse2.Or(lowNibbles, highNibbles), Vector128.Create((byte)0xF)); 158var hex = Ssse3.Shuffle(Vector128.Create( 166hex = Sse2.And(hex, Vector128.Create((ushort)0xFF).AsByte());
Microsoft.AspNetCore.Server.Kestrel.Core (5)
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (5)
147var lowNibbles = Ssse3.Shuffle(Vector128.CreateScalarUnsafe(tupleNumber).AsByte(), Vector128.Create( 155var indices = Sse2.And(Sse2.Or(lowNibbles, highNibbles), Vector128.Create((byte)0xF)); 158var hex = Ssse3.Shuffle(Vector128.Create( 166hex = Sse2.And(hex, Vector128.Create((ushort)0xFF).AsByte());
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (5)
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (5)
147var lowNibbles = Ssse3.Shuffle(Vector128.CreateScalarUnsafe(tupleNumber).AsByte(), Vector128.Create( 155var indices = Sse2.And(Sse2.Or(lowNibbles, highNibbles), Vector128.Create((byte)0xF)); 158var hex = Ssse3.Shuffle(Vector128.Create( 166hex = Sse2.And(hex, Vector128.Create((ushort)0xFF).AsByte());
Microsoft.CodeAnalysis (60)
Hashing\XxHashShared.cs (60)
351else if (Vector128.IsHardwareAccelerated) 353Vector128.Store(Vector128.Load(stateAccumulators), accumulators); 354Vector128.Store(Vector128.Load(stateAccumulators + 2), accumulators + 2); 355Vector128.Store(Vector128.Load(stateAccumulators + 4), accumulators + 4); 356Vector128.Store(Vector128.Load(stateAccumulators + 6), accumulators + 6); 408else if (Vector128.IsHardwareAccelerated) 410Vector128.Store(Vector128.Create(Prime32_3, Prime64_1), accumulators); 411Vector128.Store(Vector128.Create(Prime64_2, Prime64_3), accumulators + 2); 412Vector128.Store(Vector128.Create(Prime64_4, Prime32_2), accumulators + 4); 413Vector128.Store(Vector128.Create(Prime64_5, Prime32_1), accumulators + 6); 500else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 502Vector128<ulong> seedVec = Vector128.Create(seed, 0u - seed); 505Vector128.Store(Vector128.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 559else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 561Vector128<ulong> acc1 = Vector128.Load(accumulators); 562Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 563Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 564Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 571Vector128<uint> secretVal = Vector128.Load((uint*)secret); 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 579secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 583secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 592acc1 = ScrambleAccumulator128(acc1, Vector128.Load((ulong*)secretForScramble)); 593acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 594acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 595acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 599Vector128.Store(acc1, accumulators); 600Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 601Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 602Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 645else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 649Vector128<ulong> accVec = Accumulate128(Vector128.Load(accumulators), source, Vector128.Load((uint*)secret)); 650Vector128.Store(accVec, accumulators); 693Vector128<uint> sourceVec = Vector128.Load((uint*)source); 697Vector128<uint> sourceSwap = Vector128.Shuffle(sourceVec, Vector128.Create(2u, 3, 0, 1)); 710Vector64<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(0u, 2, 0, 0)).GetLower(); 711Vector64<uint> sourceHigh = Vector128.Shuffle(source, Vector128.Create(1u, 3, 0, 0)).GetLower(); 716Vector128<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(1u, 0, 3, 0)); 719(source & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceLow & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64(); 738else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 742Vector128<ulong> accVec = ScrambleAccumulator128(Vector128.Load(accumulators), Vector128.Load((ulong*)secret)); 743Vector128.Store(accVec, accumulators); 777Vector128<ulong> xorShift = accVec ^ Vector128.ShiftRightLogical(accVec, 47); 779accVec = xorWithKey * Vector128.Create((ulong)Prime32_1);
Microsoft.CodeAnalysis.Workspaces (60)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (60)
351else if (Vector128.IsHardwareAccelerated) 353Vector128.Store(Vector128.Load(stateAccumulators), accumulators); 354Vector128.Store(Vector128.Load(stateAccumulators + 2), accumulators + 2); 355Vector128.Store(Vector128.Load(stateAccumulators + 4), accumulators + 4); 356Vector128.Store(Vector128.Load(stateAccumulators + 6), accumulators + 6); 408else if (Vector128.IsHardwareAccelerated) 410Vector128.Store(Vector128.Create(Prime32_3, Prime64_1), accumulators); 411Vector128.Store(Vector128.Create(Prime64_2, Prime64_3), accumulators + 2); 412Vector128.Store(Vector128.Create(Prime64_4, Prime32_2), accumulators + 4); 413Vector128.Store(Vector128.Create(Prime64_5, Prime32_1), accumulators + 6); 500else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 502Vector128<ulong> seedVec = Vector128.Create(seed, 0u - seed); 505Vector128.Store(Vector128.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 559else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 561Vector128<ulong> acc1 = Vector128.Load(accumulators); 562Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 563Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 564Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 571Vector128<uint> secretVal = Vector128.Load((uint*)secret); 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 579secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 583secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 592acc1 = ScrambleAccumulator128(acc1, Vector128.Load((ulong*)secretForScramble)); 593acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 594acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 595acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 599Vector128.Store(acc1, accumulators); 600Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 601Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 602Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 645else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 649Vector128<ulong> accVec = Accumulate128(Vector128.Load(accumulators), source, Vector128.Load((uint*)secret)); 650Vector128.Store(accVec, accumulators); 693Vector128<uint> sourceVec = Vector128.Load((uint*)source); 697Vector128<uint> sourceSwap = Vector128.Shuffle(sourceVec, Vector128.Create(2u, 3, 0, 1)); 710Vector64<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(0u, 2, 0, 0)).GetLower(); 711Vector64<uint> sourceHigh = Vector128.Shuffle(source, Vector128.Create(1u, 3, 0, 0)).GetLower(); 716Vector128<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(1u, 0, 3, 0)); 719(source & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceLow & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64(); 738else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 742Vector128<ulong> accVec = ScrambleAccumulator128(Vector128.Load(accumulators), Vector128.Load((ulong*)secret)); 743Vector128.Store(accVec, accumulators); 777Vector128<ulong> xorShift = accVec ^ Vector128.ShiftRightLogical(accVec, 47); 779accVec = xorWithKey * Vector128.Create((ulong)Prime32_1);
Microsoft.ML.CpuMath (38)
AvxIntrinsics.cs (14)
439Vector128<float> scalarVector128 = Vector128.Create(scalar); 592Vector128<float> scaleVector128 = Vector128.Create(scale); 638Vector128<float> a128 = Vector128.Create(a); 639Vector128<float> b128 = Vector128.Create(b); 687Vector128<float> scaleVector128 = Vector128.Create(scale); 744Vector128<float> scaleVector128 = Vector128.Create(scale); 800Vector128<float> scaleVector128 = Vector128.Create(scale); 1128Vector128<float> meanVector128 = Vector128.Create(mean); 1221Vector128<float> meanVector128 = Vector128.Create(mean); 1314Vector128<float> meanVector128 = Vector128.Create(mean); 1533Vector128<float> xPrimal128 = Vector128.Create(primalUpdate); 1534Vector128<float> xThreshold128 = Vector128.Create(threshold); 1592Vector128<float> xPrimal128 = Vector128.Create(primalUpdate); 1593Vector128<float> xThreshold128 = Vector128.Create(threshold);
SseIntrinsics.cs (24)
67Vector128.Create(0x7FFFFFFF).AsSingle() : 68Vector128.Create(BitConverter.Int32BitsToSingle(0x7FFFFFFF)); 72=> Vector128.CreateScalar(src[idx[0]]); 76=> Vector128.Create(src[idx[0]], src[idx[1]], src[idx[2]], src[idx[3]]); 132Vector128<float> signMask = Vector128.Create(-0.0f); // 0x8000 0000 241Vector128<float> x1 = Vector128.Create(pm0[col], pm1[col], pm2[col], pm3[col]); 242Vector128<float> x2 = Vector128.Create(pSrcCurrent[col]); 363Vector128<float> scalarVector = Vector128.Create(scalar); 393Vector128<float> scaleVector128 = Vector128.Create(scale); 499Vector128<float> scaleVector = Vector128.Create(scale); 532Vector128<float> aVector = Vector128.Create(a); 533Vector128<float> bVector = Vector128.Create(b); 568Vector128<float> scaleVector = Vector128.Create(scale); 612Vector128<float> scaleVector = Vector128.Create(scale); 656Vector128<float> scaleVector = Vector128.Create(scale); 918Vector128<float> meanVector = Vector128.Create(mean); 983Vector128<float> meanVector = Vector128.Create(mean); 1048Vector128<float> meanVector = Vector128.Create(mean); 1210Vector128<float> xPrimal = Vector128.Create(primalUpdate); 1212Vector128<float> signMask = Vector128.Create(-0.0f); // 0x8000 0000 1213Vector128<float> xThreshold = Vector128.Create(threshold); 1255Vector128<float> xPrimal = Vector128.Create(primalUpdate); 1257Vector128<float> signMask = Vector128.Create(-0.0f); // 0x8000 0000 1258Vector128<float> xThreshold = Vector128.Create(threshold);
System.IO.Hashing (139)
System\IO\Hashing\Adler32.cs (16)
197Vector128.IsHardwareAccelerated && 255Vector128<sbyte> tap1 = Vector128.Create(32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17); 256Vector128<sbyte> tap2 = Vector128.Create(16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1); 266Vector128<uint> vs2 = Vector128.CreateScalar(s2); 267Vector128<uint> vps = Vector128.CreateScalar(s1 * (uint)blocks); 271Vector128<byte> bytes1 = Vector128.LoadUnsafe(ref sourceRef); 272Vector128<byte> bytes2 = Vector128.LoadUnsafe(ref sourceRef, 16); 323(Vector128<ushort> lo1, Vector128<ushort> hi1) = Vector128.Widen(bytes1); 324(Vector128<ushort> lo2, Vector128<ushort> hi2) = Vector128.Widen(bytes2); 325(Vector128<uint> sumLo, Vector128<uint> sumHi) = Vector128.Widen(lo1 + hi1 + lo2 + hi2); 332(Vector128<ushort> dLo, Vector128<ushort> dHi) = Vector128.Widen(data); 333(Vector128<short> wLo, Vector128<short> wHi) = Vector128.Widen(weights); 335(Vector128<int> pLo1, Vector128<int> pHi1) = Vector128.Widen(dLo.AsInt16() * wLo); 336(Vector128<int> pLo2, Vector128<int> pHi2) = Vector128.Widen(dHi.AsInt16() * wHi); 346s1 += Vector128.Sum(vs1); 347s2 = Vector128.Sum(vs2);
System\IO\Hashing\Crc32ParameterSet.Vectorized.cs (31)
47_k1k2 = Vector128.Create(k1, k2); 48_k3k4 = Vector128.Create(k3, k4); 51_polyMu = Vector128.Create(ReflectConstant33(fullPoly), ReflectConstant33(mu)); 82x1 = Vector128.Create<byte>(remaining).AsUInt64(); 83x2 = Vector128.Create<byte>(remaining.Slice(16)).AsUInt64(); 84Vector128<ulong> x3 = Vector128.Create<byte>(remaining.Slice(32)).AsUInt64(); 85Vector128<ulong> x4 = Vector128.Create<byte>(remaining.Slice(48)).AsUInt64(); 89x1 ^= Vector128.CreateScalar(crc).AsUInt64(); 93Vector128<ulong> y5 = Vector128.Create<byte>(remaining).AsUInt64(); 94Vector128<ulong> y6 = Vector128.Create<byte>(remaining.Slice(16)).AsUInt64(); 95Vector128<ulong> y7 = Vector128.Create<byte>(remaining.Slice(32)).AsUInt64(); 96Vector128<ulong> y8 = Vector128.Create<byte>(remaining.Slice(48)).AsUInt64(); 112x1 = Vector128.Create<byte>(remaining).AsUInt64(); 113x1 ^= Vector128.CreateScalar(crc).AsUInt64(); 120x1 = FoldPolynomialPair(Vector128.Create<byte>(remaining).AsUInt64(), x1, _k3k4); 126Vector128<ulong> bitmask = Vector128.Create(~0, 0, ~0, 0).AsUInt64(); 128CarrylessMultiplyLower(x1, Vector128.CreateScalar(_k4)); 129x1 = CarrylessMultiplyLower(x1 & bitmask, Vector128.CreateScalar(_k6)) ^ 166_k1k2 = Vector128.Create(k2, k1); 167_k3k4 = Vector128.Create(k4, k3); 170_foldConstants = Vector128.Create( 182Vector128<byte> vector = Vector128.Create<byte>(source); 186vector = Vector128.Shuffle( 188Vector128.Create( 222x1 ^= ShiftLowerToUpper(Vector128.CreateScalar((ulong)crc << 32)); 246x1 ^= ShiftLowerToUpper(Vector128.CreateScalar((ulong)crc << 32)); 260Vector128<ulong> lowerMask = Vector128.Create(~0UL, 0UL); 261x1 = CarrylessMultiplyLeftUpperRightLower(x1, Vector128.CreateScalar(_k6)) ^ (x1 & lowerMask); 263Vector128<ulong> bitmask = Vector128.Create(~0, 0, ~0, 0).AsUInt64(); 266x1 = CarrylessMultiplyLower(x1, Vector128.CreateScalar(_mu)); 269x1 = CarrylessMultiplyLower(x1, Vector128.CreateScalar<ulong>(Polynomial));
System\IO\Hashing\Crc64ParameterSet.Vectorized.cs (26)
48_k1k2 = Vector128.Create(k1, k2); 49_k3k4 = Vector128.Create(k3, k4); 51_muPoly = Vector128.Create(mu, reflectedPoly); 91x1 = Vector128.Create<byte>(remaining).AsUInt64(); 92Vector128<ulong> x2 = Vector128.Create<byte>(remaining.Slice(16)).AsUInt64(); 93Vector128<ulong> x3 = Vector128.Create<byte>(remaining.Slice(32)).AsUInt64(); 94Vector128<ulong> x4 = Vector128.Create<byte>(remaining.Slice(48)).AsUInt64(); 98x1 ^= Vector128.CreateScalar(crc); 102Vector128<ulong> y5 = Vector128.Create<byte>(remaining).AsUInt64(); 103Vector128<ulong> y6 = Vector128.Create<byte>(remaining.Slice(16)).AsUInt64(); 104Vector128<ulong> y7 = Vector128.Create<byte>(remaining.Slice(32)).AsUInt64(); 105Vector128<ulong> y8 = Vector128.Create<byte>(remaining.Slice(48)).AsUInt64(); 121x1 = Vector128.Create<byte>(remaining).AsUInt64(); 122x1 ^= Vector128.CreateScalar(crc); 129x1 = FoldPolynomialPair(Vector128.Create<byte>(remaining).AsUInt64(), x1, _k3k4); 136x1 = CarrylessMultiplyLower(x1, Vector128.CreateScalar(_k4)); 174_k1k2 = Vector128.Create(k2, k1); 175_k3k4 = Vector128.Create(k4, k3); 177_muPoly = Vector128.Create(mu, reducedPolynomial); 185Vector128<byte> vector = Vector128.Create<byte>(source); 189vector = Vector128.Shuffle( 191Vector128.Create( 225x1 ^= ShiftLowerToUpper(Vector128.CreateScalar(crc)); 249x1 ^= ShiftLowerToUpper(Vector128.CreateScalar(crc)); 264Vector128.CreateScalar(_k4)) ^ ShiftLowerToUpper(x1); 269(x1 & Vector128.Create(0UL, ~0UL));
System\IO\Hashing\XxHashShared.cs (66)
343else if (Vector128.IsHardwareAccelerated) 345Vector128.Store(Vector128.Load(stateAccumulators), accumulators); 346Vector128.Store(Vector128.Load(stateAccumulators + 2), accumulators + 2); 347Vector128.Store(Vector128.Load(stateAccumulators + 4), accumulators + 4); 348Vector128.Store(Vector128.Load(stateAccumulators + 6), accumulators + 6); 400else if (Vector128.IsHardwareAccelerated) 402Vector128.Store(Vector128.Create(Prime32_3, Prime64_1), accumulators); 403Vector128.Store(Vector128.Create(Prime64_2, Prime64_3), accumulators + 2); 404Vector128.Store(Vector128.Create(Prime64_4, Prime32_2), accumulators + 4); 405Vector128.Store(Vector128.Create(Prime64_5, Prime32_1), accumulators + 6); 492else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 494Vector128<ulong> seedVec = Vector128.Create(seed, 0u - seed); 497Vector128.Store(Vector128.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 551else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 553Vector128<ulong> acc1 = Vector128.Load(accumulators); 554Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 555Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 556Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 563Vector128<uint> secretVal = Vector128.Load((uint*)secret); 567secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 571secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 575secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 584acc1 = ScrambleAccumulator128(acc1, Vector128.Load((ulong*)secretForScramble)); 585acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 586acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 587acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 591Vector128.Store(acc1, accumulators); 592Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 593Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 594Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 637else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 641Vector128<ulong> accVec = Accumulate128(Vector128.Load(accumulators), source, Vector128.Load((uint*)secret)); 642Vector128.Store(accVec, accumulators); 685Vector128<uint> sourceVec = Vector128.Load((uint*)source); 689Vector128<uint> sourceSwap = Vector128.Shuffle(sourceVec, Vector128.Create(2u, 3, 0, 1)); 702Vector64<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(0u, 2, 0, 0)).GetLower(); 703Vector64<uint> sourceHigh = Vector128.Shuffle(source, Vector128.Create(1u, 3, 0, 0)).GetLower(); 708Vector128<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(1u, 0, 3, 0)); 717Vector128<uint> evens = Vector128.Shuffle(source, Vector128.Create(0u, 2, 0, 0)); 718Vector128<uint> odds = Vector128.Shuffle(source, Vector128.Create(1u, 3, 0, 0)); 723Vector128<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(1u, 0, 3, 0)); 724return (source & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceLow & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64(); 743else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 747Vector128<ulong> accVec = ScrambleAccumulator128(Vector128.Load(accumulators), Vector128.Load((ulong*)secret)); 748Vector128.Store(accVec, accumulators); 782Vector128<ulong> xorShift = accVec ^ Vector128.ShiftRightLogical(accVec, 47); 784accVec = xorWithKey * Vector128.Create((ulong)Prime32_1);
System.Net.Primitives (4)
System\Net\IPAddress.cs (4)
202if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 204Vector128<ushort> ushorts = Vector128.Create(address).AsUInt16(); 358if (Vector128.IsHardwareAccelerated) 360Vector128<ushort> ushorts = Vector128.Create(numbers).AsUInt16();
System.Numerics.Tensors (1173)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (139)
112if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TTransformOperator.Vectorizable) 152Vector128<T> vresult = Vector128.Create(TAggregationOperator.IdentityValue); 156Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 157Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 216vector1 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))); 217vector2 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))); 218vector3 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))); 219vector4 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))); 228vector1 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))); 229vector2 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))); 230vector3 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))); 231vector4 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))); 255beg = Vector128.ConditionalSelect(CreateAlignmentMaskVector128<T>((int)misalignment), beg, Vector128.Create(TAggregationOperator.IdentityValue)); 272Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7))); 279Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6))); 286Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5))); 293Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4))); 300Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3))); 307Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2))); 314Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 1))); 322end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)trailing), end, Vector128.Create(TAggregationOperator.IdentityValue)); 797Debug.Assert(Vector128.IsHardwareAccelerated); 799Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 800Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 802end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 811Debug.Assert(Vector128.IsHardwareAccelerated); 813Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 944Debug.Assert(Vector128.IsHardwareAccelerated); 946Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 947Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 949end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 958Debug.Assert(Vector128.IsHardwareAccelerated); 960Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 1044Debug.Assert(Vector128.IsHardwareAccelerated); 1046Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 1047Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1049end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 1057Debug.Assert(Vector128.IsHardwareAccelerated); 1059Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 1127Debug.Assert(Vector128.IsHardwareAccelerated); 1129Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 1130Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1132end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 1140Debug.Assert(Vector128.IsHardwareAccelerated); 1142Vector128<T> beg = transform.Invoke(Vector128.LoadUnsafe(ref xRef)); 1231if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TBinaryOperator.Vectorizable) 1272Vector128<T> vresult = Vector128.Create(TAggregationOperator.IdentityValue); 1276Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1277Vector128.LoadUnsafe(ref yRef)); 1278Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1279Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1345vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1346Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0))); 1347vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1348Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1))); 1349vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1350Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2))); 1351vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1352Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3))); 1361vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1362Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4))); 1363vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1364Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5))); 1365vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1366Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6))); 1367vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1368Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7))); 1394beg = Vector128.ConditionalSelect(CreateAlignmentMaskVector128<T>((int)misalignment), beg, Vector128.Create(TAggregationOperator.IdentityValue)); 1411Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 1412Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7))); 1419Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 1420Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6))); 1427Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 1428Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5))); 1435Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 1436Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4))); 1443Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 1444Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3))); 1451Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 1452Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2))); 1459Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 1)), 1460Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 1))); 1468end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)trailing), end, Vector128.Create(TAggregationOperator.IdentityValue)); 1996Debug.Assert(Vector128.IsHardwareAccelerated); 1998Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1999Vector128.LoadUnsafe(ref yRef)); 2000Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2001Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2003end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 2012Debug.Assert(Vector128.IsHardwareAccelerated); 2014Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2015Vector128.LoadUnsafe(ref yRef)); 2149Debug.Assert(Vector128.IsHardwareAccelerated); 2151Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2152Vector128.LoadUnsafe(ref yRef)); 2153Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2154Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2156end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 2165Debug.Assert(Vector128.IsHardwareAccelerated); 2167Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2168Vector128.LoadUnsafe(ref yRef)); 2255Debug.Assert(Vector128.IsHardwareAccelerated); 2257Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2258Vector128.LoadUnsafe(ref yRef)); 2259Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2260Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2262end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 2270Debug.Assert(Vector128.IsHardwareAccelerated); 2272Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2273Vector128.LoadUnsafe(ref yRef)); 2346Debug.Assert(Vector128.IsHardwareAccelerated); 2348Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2349Vector128.LoadUnsafe(ref yRef)); 2350Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2351Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 2353end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.Count)), end, Vector128.Create(TAggregationOperator.IdentityValue)); 2361Debug.Assert(Vector128.IsHardwareAccelerated); 2363Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2364Vector128.LoadUnsafe(ref yRef)); 2395return Vector128.LoadUnsafe( 2402return Vector128.LoadUnsafe( 2409return Vector128.LoadUnsafe( 2416return Vector128.LoadUnsafe( 2503return Vector128.LoadUnsafe( 2510return Vector128.LoadUnsafe( 2517return Vector128.LoadUnsafe( 2524return Vector128.LoadUnsafe(
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (158)
121if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TBinaryOperator.Vectorizable) 160Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 161Vector128.LoadUnsafe(ref yRef)); 162Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 163Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 217vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 218Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0))); 219vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 220Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1))); 221vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 222Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2))); 223vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 224Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3))); 233vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 234Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4))); 235vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 236Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5))); 237vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 238Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6))); 239vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 240Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7))); 263vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 264Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0))); 265vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 266Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1))); 267vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 268Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2))); 269vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 270Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3))); 279vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 280Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4))); 281vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 282Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5))); 283vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 284Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6))); 285vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 286Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7))); 326Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 327Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8))); 334Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 335Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7))); 342Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 343Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6))); 350Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 351Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5))); 358Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 359Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4))); 366Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 367Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3))); 374Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 375Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2))); 984Debug.Assert(Vector128.IsHardwareAccelerated); 986Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 987Vector128.LoadUnsafe(ref yRef)); 988Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 989Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1000Debug.Assert(Vector128.IsHardwareAccelerated); 1002Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1003Vector128.LoadUnsafe(ref yRef)); 1148Debug.Assert(Vector128.IsHardwareAccelerated); 1150Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1151Vector128.LoadUnsafe(ref yRef)); 1152Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1153Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1164Debug.Assert(Vector128.IsHardwareAccelerated); 1166Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1167Vector128.LoadUnsafe(ref yRef)); 1257Debug.Assert(Vector128.IsHardwareAccelerated); 1259Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1260Vector128.LoadUnsafe(ref yRef)); 1261Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1262Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1272Debug.Assert(Vector128.IsHardwareAccelerated); 1274Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1275Vector128.LoadUnsafe(ref yRef)); 1345Debug.Assert(Vector128.IsHardwareAccelerated); 1347Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1348Vector128.LoadUnsafe(ref yRef)); 1349Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1350Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count)); 1360Debug.Assert(Vector128.IsHardwareAccelerated); 1362Vector128<T> beg = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1363Vector128.LoadUnsafe(ref yRef)); 1453if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TTransformOperator.Vectorizable && TBinaryOperator.Vectorizable) 1492Vector128<T> yVec = Vector128.Create(y); 1494Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 1496Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 1548vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))), 1550vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))), 1552vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))), 1554vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))), 1564vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))), 1566vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))), 1568vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))), 1570vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))), 1593vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))), 1595vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))), 1597vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))), 1599vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))), 1609vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))), 1611vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))), 1613vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))), 1615vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))), 1654Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8))), 1662Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7))), 1670Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6))), 1678Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5))), 1686Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4))), 1694Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3))), 1702Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2))), 2306Debug.Assert(Vector128.IsHardwareAccelerated); 2308Vector128<T> yVec = Vector128.Create(y); 2310Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2312Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2324Debug.Assert(Vector128.IsHardwareAccelerated); 2326Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2327Vector128.Create(y)); 2474Debug.Assert(Vector128.IsHardwareAccelerated); 2476Vector128<T> yVec = Vector128.Create(y); 2478Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2480Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2492Debug.Assert(Vector128.IsHardwareAccelerated); 2494Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2495Vector128.Create(y)); 2587Debug.Assert(Vector128.IsHardwareAccelerated); 2589Vector128<T> yVec = Vector128.Create(y); 2591Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2593Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2604Debug.Assert(Vector128.IsHardwareAccelerated); 2606Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2607Vector128.Create(y)); 2679Debug.Assert(Vector128.IsHardwareAccelerated); 2681Vector128<T> yVec = Vector128.Create(y); 2683Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2685Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)), 2696Debug.Assert(Vector128.IsHardwareAccelerated); 2698Vector128<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef)), 2699Vector128.Create(y)); 2743x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsByte(), Vector128.Create((byte)8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7)).As<byte, T>()); 2744x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsByte(), Vector128.Create((byte)4, 5, 6, 7, 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>()); 2745x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsByte(), Vector128.Create((byte)2, 3, 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>()); 2746x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsByte(), Vector128.Create((byte)1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>()); 2750x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsInt16(), Vector128.Create(4, 5, 6, 7, 0, 1, 2, 3)).As<short, T>()); 2751x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsInt16(), Vector128.Create(2, 3, 0, 1, 4, 5, 6, 7)).As<short, T>()); 2752x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsInt16(), Vector128.Create(1, 0, 2, 3, 4, 5, 6, 7)).As<short, T>()); 2756x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsInt32(), Vector128.Create(2, 3, 0, 1)).As<int, T>()); 2757x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsInt32(), Vector128.Create(1, 0, 3, 2)).As<int, T>()); 2762x = TAggregate.Invoke(x, Vector128.Shuffle(x.AsInt64(), Vector128.Create(1, 0)).As<long, T>());
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (37)
39public static bool ShouldEarlyExit(Vector128<T> result) => Vector128.AnyWhereAllBitsSet(result); 51typeof(T) == typeof(float) ? Vector128.EqualsAny(result.AsUInt32(), Vector128<uint>.Zero) : 52typeof(T) == typeof(double) ? Vector128.EqualsAny(result.AsUInt64(), Vector128<ulong>.Zero) : 53Vector128.EqualsAny(result, Vector128<T>.Zero); 139if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 147if (TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)))) 158TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count))))) 279if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 303Vector128<byte> v = TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsByte(); 393if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 418Vector128.Narrow( 419TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsUInt16(), 420TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt16()); 518if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 543Vector128.Narrow( 544Vector128.Narrow( 545TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsUInt32(), 546TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt32()), 547Vector128.Narrow( 548TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt32(), 549TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt32())); 665if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 692Vector128.Narrow( 693Vector128.Narrow( 694Vector128.Narrow( 695TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsUInt64(), 696TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt64()), 697Vector128.Narrow( 698TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt64(), 699TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt64())), 700Vector128.Narrow( 701Vector128.Narrow( 702TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (4 * Vector128<T>.Count)))).AsUInt64(), 703TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (5 * Vector128<T>.Count)))).AsUInt64()), 704Vector128.Narrow( 705TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (6 * Vector128<T>.Count)))).AsUInt64(), 706TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (7 * Vector128<T>.Count)))).AsUInt64())));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfMinMaxOperator.cs (36)
47if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 93Vector128<T> result = Vector128.Create(x); 96Vector128<T> nanMask = Vector128.IsNaN(result); 104Vector128<TInt> indexIncrement = Vector128.Create(TInt.CreateTruncating(Vector128<TInt>.Count)); 114current = Vector128.Create(span); 121current = Vector128.Create(x.Slice(start)); 122currentIndex = Vector128.Create(TInt.CreateTruncating(start)) + Vector128<TInt>.Indices; 129Vector128<T> nanMask = Vector128.IsNaN(current); 148Vector128<TInt> aggMask = ~Vector128.Equals(result.As<T, TInt>(), Vector128.Create(aggResult).As<T, TInt>()); 160Vector128<T> result = Vector128.Create(x); 163Vector128<T> nanMask = Vector128.IsNaN(result); 171Vector128<uint> indexIncrement = Vector128.Create((uint)Vector128<uint>.Count); 182current = Vector128.Create(span); 189current = Vector128.Create(x.Slice(start)); 190currentIndex = Vector128.Create((uint)start) + Vector128<uint>.Indices; 197Vector128<T> nanMask = Vector128.IsNaN(current); 206(Vector128<int> mask1, Vector128<int> mask2) = Vector128.Widen(mask.AsInt16()); 219Vector128<short> aggMask = ~Vector128.Equals(result.AsInt16(), Vector128.Create(aggResult).AsInt16()); 221(Vector128<int> mask1, Vector128<int> mask2) = Vector128.Widen(aggMask); 235Vector128<T> result = Vector128.Create(x); 238Vector128<T> nanMask = Vector128.IsNaN(result); 246Vector128<uint> indexIncrement = Vector128.Create((uint)Vector128<uint>.Count); 259current = Vector128.Create(span); 266current = Vector128.Create(x.Slice(start)); 267currentIndex = Vector128.Create((uint)start) + Vector128<uint>.Indices; 274Vector128<T> nanMask = Vector128.IsNaN(current); 283(Vector128<short> lowerMask, Vector128<short> upperMask) = Vector128.Widen(mask.AsSByte()); 284(Vector128<int> mask1, Vector128<int> mask2) = Vector128.Widen(lowerMask); 285(Vector128<int> mask3, Vector128<int> mask4) = Vector128.Widen(upperMask); 302Vector128<sbyte> aggMask = ~Vector128.Equals(result.AsSByte(), Vector128.Create(aggResult).AsSByte()); 304(Vector128<short> lowerMask, Vector128<short> upperMask) = Vector128.Widen(aggMask); 305(Vector128<int> mask1, Vector128<int> mask2) = Vector128.Widen(lowerMask); 306(Vector128<int> mask3, Vector128<int> mask4) = Vector128.Widen(upperMask);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs (46)
87if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TStatefulUnaryOperator.Vectorizable) 125Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 126Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 177vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))); 178vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))); 179vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))); 180vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))); 189vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))); 190vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))); 191vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))); 192vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))); 214vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0))); 215vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1))); 216vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2))); 217vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3))); 226vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4))); 227vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5))); 228vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6))); 229vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7))); 267Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8))); 274Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7))); 281Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6))); 288Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5))); 295Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4))); 302Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3))); 309Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2))); 853Debug.Assert(Vector128.IsHardwareAccelerated); 855Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 856Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 867Debug.Assert(Vector128.IsHardwareAccelerated); 869Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 997Debug.Assert(Vector128.IsHardwareAccelerated); 999Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 1000Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1011Debug.Assert(Vector128.IsHardwareAccelerated); 1013Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 1094Debug.Assert(Vector128.IsHardwareAccelerated); 1096Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 1097Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1107Debug.Assert(Vector128.IsHardwareAccelerated); 1109Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 1174Debug.Assert(Vector128.IsHardwareAccelerated); 1176Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef)); 1177Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count)); 1187Debug.Assert(Vector128.IsHardwareAccelerated); 1189Vector128<T> beg = op.Invoke(Vector128.LoadUnsafe(ref xRef));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (276)
108if (TTernaryOperator.Vectorizable && Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported) 148Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 149Vector128.LoadUnsafe(ref yRef), 150Vector128.LoadUnsafe(ref zRef)); 151Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 152Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 153Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 210vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 211Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 212Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 0))); 213vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 214Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 215Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 1))); 216vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 217Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 218Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 2))); 219vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 220Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 221Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 3))); 230vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 231Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 232Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 4))); 233vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 234Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 235Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 5))); 236vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 237Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 238Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 6))); 239vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 240Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 241Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 7))); 265vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 266Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 267Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 0))); 268vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 269Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 270Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 1))); 271vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 272Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 273Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 2))); 274vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 275Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 276Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 3))); 285vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 286Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 287Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 4))); 288vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 289Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 290Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 5))); 291vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 292Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 293Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 6))); 294vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 295Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 296Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 7))); 338Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 339Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8)), 340Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 8))); 347Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 348Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7)), 349Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 7))); 356Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 357Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6)), 358Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 6))); 365Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 366Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5)), 367Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 5))); 374Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 375Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4)), 376Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 4))); 383Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 384Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3)), 385Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 3))); 392Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 393Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2)), 394Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 2))); 1068Debug.Assert(Vector128.IsHardwareAccelerated); 1070Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1071Vector128.LoadUnsafe(ref yRef), 1072Vector128.LoadUnsafe(ref zRef)); 1073Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1074Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1075Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1086Debug.Assert(Vector128.IsHardwareAccelerated); 1088Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1089Vector128.LoadUnsafe(ref yRef), 1090Vector128.LoadUnsafe(ref zRef)); 1252Debug.Assert(Vector128.IsHardwareAccelerated); 1254Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1255Vector128.LoadUnsafe(ref yRef), 1256Vector128.LoadUnsafe(ref zRef)); 1257Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1258Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1259Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1270Debug.Assert(Vector128.IsHardwareAccelerated); 1272Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1273Vector128.LoadUnsafe(ref yRef), 1274Vector128.LoadUnsafe(ref zRef)); 1373Debug.Assert(Vector128.IsHardwareAccelerated); 1375Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1376Vector128.LoadUnsafe(ref yRef), 1377Vector128.LoadUnsafe(ref zRef)); 1378Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1379Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1380Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1390Debug.Assert(Vector128.IsHardwareAccelerated); 1392Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1393Vector128.LoadUnsafe(ref yRef), 1394Vector128.LoadUnsafe(ref zRef)); 1469Debug.Assert(Vector128.IsHardwareAccelerated); 1471Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1472Vector128.LoadUnsafe(ref yRef), 1473Vector128.LoadUnsafe(ref zRef)); 1474Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1475Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1476Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1486Debug.Assert(Vector128.IsHardwareAccelerated); 1488Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1489Vector128.LoadUnsafe(ref yRef), 1490Vector128.LoadUnsafe(ref zRef)); 1583if (TTernaryOperator.Vectorizable && Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported) 1623Vector128<T> zVec = Vector128.Create(z); 1625Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1626Vector128.LoadUnsafe(ref yRef), 1628Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1629Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1684vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1685Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 1687vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1688Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 1690vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1691Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 1693vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1694Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 1704vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1705Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 1707vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1708Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 1710vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1711Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 1713vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1714Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 1738vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1739Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 1741vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1742Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 1744vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1745Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 1747vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1748Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 1758vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1759Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 1761vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1762Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 1764vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1765Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 1767vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1768Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 1809Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 1810Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8)), 1818Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 1819Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7)), 1827Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 1828Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6)), 1836Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 1837Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5)), 1845Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 1846Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4)), 1854Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 1855Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3)), 1863Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 1864Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2)), 2533Debug.Assert(Vector128.IsHardwareAccelerated); 2535Vector128<T> zVec = Vector128.Create(z); 2537Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2538Vector128.LoadUnsafe(ref yRef), 2540Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2541Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2553Debug.Assert(Vector128.IsHardwareAccelerated); 2555Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2556Vector128.LoadUnsafe(ref yRef), 2557Vector128.Create(z)); 2721Debug.Assert(Vector128.IsHardwareAccelerated); 2723Vector128<T> zVec = Vector128.Create(z); 2725Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2726Vector128.LoadUnsafe(ref yRef), 2728Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2729Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2741Debug.Assert(Vector128.IsHardwareAccelerated); 2743Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2744Vector128.LoadUnsafe(ref yRef), 2745Vector128.Create(z)); 2846Debug.Assert(Vector128.IsHardwareAccelerated); 2848Vector128<T> zVec = Vector128.Create(z); 2850Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2851Vector128.LoadUnsafe(ref yRef), 2853Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2854Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2865Debug.Assert(Vector128.IsHardwareAccelerated); 2867Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2868Vector128.LoadUnsafe(ref yRef), 2869Vector128.Create(z)); 2946Debug.Assert(Vector128.IsHardwareAccelerated); 2948Vector128<T> zVec = Vector128.Create(z); 2950Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2951Vector128.LoadUnsafe(ref yRef), 2953Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2954Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2965Debug.Assert(Vector128.IsHardwareAccelerated); 2967Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2968Vector128.LoadUnsafe(ref yRef), 2969Vector128.Create(z)); 3069if (TTernaryOperator.Vectorizable && Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported) 3109Vector128<T> yVec = Vector128.Create(y); 3110Vector128<T> zVec = Vector128.Create(z); 3112Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 3115Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 3168vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 3171vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 3174vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 3177vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 3188vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 3191vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 3194vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 3197vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 3221vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 3224vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 3227vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 3230vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 3241vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 3244vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 3247vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 3250vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 3290Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 3299Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 3308Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 3317Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 3326Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 3335Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 3344Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 4005Debug.Assert(Vector128.IsHardwareAccelerated); 4007Vector128<T> yVec = Vector128.Create(y); 4008Vector128<T> zVec = Vector128.Create(z); 4010Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4013Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4026Debug.Assert(Vector128.IsHardwareAccelerated); 4028Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4029Vector128.Create(y), 4030Vector128.Create(z)); 4195Debug.Assert(Vector128.IsHardwareAccelerated); 4197Vector128<T> yVec = Vector128.Create(y); 4198Vector128<T> zVec = Vector128.Create(z); 4200Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4203Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4216Debug.Assert(Vector128.IsHardwareAccelerated); 4218Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4219Vector128.Create(y), 4220Vector128.Create(z)); 4322Debug.Assert(Vector128.IsHardwareAccelerated); 4324Vector128<T> yVec = Vector128.Create(y); 4325Vector128<T> zVec = Vector128.Create(z); 4327Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4330Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4342Debug.Assert(Vector128.IsHardwareAccelerated); 4344Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4345Vector128.Create(y), 4346Vector128.Create(z)); 4424Debug.Assert(Vector128.IsHardwareAccelerated); 4426Vector128<T> yVec = Vector128.Create(y); 4427Vector128<T> zVec = Vector128.Create(z); 4429Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4432Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4444Debug.Assert(Vector128.IsHardwareAccelerated); 4446Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4447Vector128.Create(y), 4448Vector128.Create(z));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (30)
130if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TUnaryOperator.Vectorizable) 138(Vector128<T> first, Vector128<T> second) = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i)); 151(Vector128<T> first, Vector128<T> second) = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i)); 301if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TOperator.Vectorizable) 309(Vector128<T> first, Vector128<T> second) = TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), Vector128.LoadUnsafe(ref yRef, (uint)i)); 320Vector128<T> mask = Vector128.Equals(CreateRemainderMaskVector128<T>(x.Length - i), Vector128<T>.Zero); 324Vector128<T> first = Vector128.ConditionalSelect(mask, 325Vector128.Create(TOperator.RemainderMaskValue), 326Vector128.LoadUnsafe(ref xRef, (uint)i)); 328Vector128<T> second = Vector128.ConditionalSelect(mask, 329Vector128.Create(TOperator.RemainderMaskValue), 330Vector128.LoadUnsafe(ref yRef, (uint)i)); 334Vector128.ConditionalSelect(mask, 335Vector128.LoadUnsafe(ref destination1Ref, (uint)i), 339Vector128.ConditionalSelect(mask, 340Vector128.LoadUnsafe(ref destination2Ref, (uint)i), 486if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TOperator.Vectorizable) 491Vector128<T> yVec = Vector128.Create(y); 496(Vector128<T> first, Vector128<T> second) = TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), yVec); 507Vector128<T> mask = Vector128.Equals(CreateRemainderMaskVector128<T>(x.Length - i), Vector128<T>.Zero); 511Vector128<T> first = Vector128.ConditionalSelect(mask, 512Vector128.Create(TOperator.RemainderMaskValue), 513Vector128.LoadUnsafe(ref xRef, (uint)i)); 515Vector128<T> second = Vector128.ConditionalSelect(mask, 516Vector128.Create(TOperator.RemainderMaskValue), 521Vector128.ConditionalSelect(mask, 522Vector128.LoadUnsafe(ref destination1Ref, (uint)i), 526Vector128.ConditionalSelect(mask, 527Vector128.LoadUnsafe(ref destination2Ref, (uint)i),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToFourOperator.cs (3)
118if (Vector128.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 129(Vector128<TOutput>, Vector128<TOutput>, Vector128<TOutput>, Vector128<TOutput>) results = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i)); 144(Vector128<TOutput>, Vector128<TOutput>, Vector128<TOutput>, Vector128<TOutput>) results = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs (3)
110if (Vector128.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 121(Vector128<TOutput> lower, Vector128<TOutput> upper) = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i)); 134(Vector128<TOutput> lower, Vector128<TOutput> upper) = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs (46)
127if (Vector128.IsHardwareAccelerated && Vector128<TInput>.IsSupported && Vector128<TOutput>.IsSupported && TUnaryOperator.Vectorizable && sizeof(TInput) == sizeof(TOutput)) 165Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 166Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 217vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 0))); 218vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 1))); 219vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 2))); 220vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 3))); 229vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 4))); 230vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 5))); 231vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 6))); 232vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 7))); 254vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 0))); 255vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 1))); 256vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 2))); 257vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 3))); 266vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 4))); 267vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 5))); 268vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 6))); 269vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.Count * 7))); 307Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 8))); 314Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 7))); 321Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 6))); 328Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 5))); 335Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 4))); 342Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 3))); 349Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.Count * 2))); 893Debug.Assert(Vector128.IsHardwareAccelerated); 895Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 896Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 907Debug.Assert(Vector128.IsHardwareAccelerated); 909Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 1037Debug.Assert(Vector128.IsHardwareAccelerated); 1039Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 1040Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 1051Debug.Assert(Vector128.IsHardwareAccelerated); 1053Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 1134Debug.Assert(Vector128.IsHardwareAccelerated); 1136Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 1137Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 1147Debug.Assert(Vector128.IsHardwareAccelerated); 1149Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 1214Debug.Assert(Vector128.IsHardwareAccelerated); 1216Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef)); 1217Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.Count)); 1227Debug.Assert(Vector128.IsHardwareAccelerated); 1229Vector128<TOutput> beg = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs (5)
110if (Vector128.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 122Vector128.LoadUnsafe(ref xRef, (uint)i), 123Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i); 135Vector128.LoadUnsafe(ref xRef, (uint)i), 136Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i);
System\Numerics\Tensors\netcore\TensorPrimitives.Abs.cs (4)
59Vector128<T> abs = Vector128.ConditionalSelect(Vector128.LessThan(x, Vector128<T>.Zero), -x, x); 60if (Vector128.LessThan(abs, Vector128<T>.Zero) != Vector128<T>.Zero) 66return Vector128.Abs(x);
System\Numerics\Tensors\netcore\TensorPrimitives.AcosPi.cs (1)
34public static Vector128<T> Invoke(Vector128<T> x) => AcosOperator<T>.Invoke(x) / Vector128.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Add.cs (1)
72public static T Invoke(Vector128<T> x) => Vector128.Sum(x);
System\Numerics\Tensors\netcore\TensorPrimitives.Asin.cs (2)
47return Vector128.Asin(x.AsDouble()).As<double, T>(); 52return Vector128.Asin(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.AsinPi.cs (1)
34public static Vector128<T> Invoke(Vector128<T> x) => AsinOperator<T>.Invoke(x) / Vector128.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Atan2Pi.cs (1)
75public static Vector128<T> Invoke(Vector128<T> y, Vector128<T> x) => Atan2Operator<T>.Invoke(y, x) / Vector128.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.AtanPi.cs (1)
34public static Vector128<T> Invoke(Vector128<T> x) => AtanOperator<T>.Invoke(x) / Vector128.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.BitDecrement.cs (24)
50Vector128<uint> result = Vector128.ConditionalSelect( 51Vector128.IsNegative(xFloat).AsUInt32(), 56Vector128<uint> isPositiveZero = Vector128.IsZero(xFloat).AsUInt32(); 57Vector128<uint> specialValue = Vector128.Create(BitConverter.SingleToUInt32Bits(-float.Epsilon)) & isPositiveZero; 59Vector128<uint> isNaNOrNegInf = (Vector128.IsNaN(xFloat) | Vector128.IsNegativeInfinity(xFloat)).AsUInt32(); 63return Vector128.ConditionalSelect(specialMask, specialValue, result).AsSingle().As<float, T>(); 72Vector128<ulong> result = Vector128.ConditionalSelect( 73Vector128.IsNegative(xDouble).AsUInt64(), 78Vector128<ulong> isPositiveZero = Vector128.IsZero(xDouble).AsUInt64(); 79Vector128<ulong> specialValue = Vector128.Create(BitConverter.DoubleToUInt64Bits(-double.Epsilon)) & isPositiveZero; 81Vector128<ulong> isNaNOrNegInf = (Vector128.IsNaN(xDouble) | Vector128.IsNegativeInfinity(xDouble)).AsUInt64(); 85return Vector128.ConditionalSelect(specialMask, specialValue, result).AsDouble().As<double, T>(); 213Vector128<ushort> isNegative = Vector128.IsNegative(x).AsUInt16(); 214Vector128<ushort> result = Vector128.ConditionalSelect( 220Vector128<ushort> isPositiveZero = Vector128.IsZero(bits); 221Vector128<ushort> specialValue = Vector128.Create(NegativeEpsilonBits) & isPositiveZero; 225Vector128<ushort> absValue = bits & Vector128.Create((ushort)0x7FFF); 226Vector128<ushort> isNaN = Vector128.GreaterThan(absValue, Vector128.Create(PositiveInfinityBits)); 227Vector128<ushort> isNegInf = Vector128.Equals(bits, Vector128.Create(NegativeInfinityBits)); 232return Vector128.ConditionalSelect(specialMask, specialValue, result).AsInt16();
System\Numerics\Tensors\netcore\TensorPrimitives.BitIncrement.cs (27)
50Vector128<uint> result = Vector128.ConditionalSelect( 51Vector128.IsNegative(xFloat).AsUInt32(), 56Vector128<uint> isNegativeZero = Vector128.Equals(bits, Vector128.Create(0x8000_0000u)); 57Vector128<uint> specialValue = Vector128.Create(0x0000_0001u) & isNegativeZero; 59Vector128<uint> isNaNOrPosInf = (Vector128.IsNaN(xFloat) | Vector128.IsPositiveInfinity(xFloat)).AsUInt32(); 63return Vector128.ConditionalSelect(specialMask, specialValue, result).AsSingle().As<float, T>(); 72Vector128<ulong> result = Vector128.ConditionalSelect( 73Vector128.IsNegative(xDouble).AsUInt64(), 78Vector128<ulong> isNegativeZero = Vector128.Equals(bits, Vector128.Create(0x8000_0000_0000_0000ul)); 79Vector128<ulong> specialValue = Vector128.Create(0x0000_0000_0000_0001ul) & isNegativeZero; 81Vector128<ulong> isNaNOrPosInf = (Vector128.IsNaN(xDouble) | Vector128.IsPositiveInfinity(xDouble)).AsUInt64(); 85return Vector128.ConditionalSelect(specialMask, specialValue, result).AsDouble().As<double, T>(); 213Vector128<ushort> isNegative = Vector128.IsNegative(x).AsUInt16(); 214Vector128<ushort> result = Vector128.ConditionalSelect( 220Vector128<ushort> isNegativeZero = Vector128.Equals(bits, Vector128.Create(NegativeZeroBits)); 221Vector128<ushort> specialValue = Vector128.Create(EpsilonBits) & isNegativeZero; 225Vector128<ushort> absValue = bits & Vector128.Create((ushort)0x7FFF); 226Vector128<ushort> isNaN = Vector128.GreaterThan(absValue, Vector128.Create(PositiveInfinityBits)); 227Vector128<ushort> isPosInf = Vector128.Equals(bits, Vector128.Create(PositiveInfinityBits)); 232return Vector128.ConditionalSelect(specialMask, specialValue, result).AsInt16();
System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs (2)
37return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.AsSingle()) / Vector128.Create(3f)).As<float, T>(); 42return ExpOperator<double>.Invoke(LogOperator<double>.Invoke(x.AsDouble()) / Vector128.Create(3d)).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (2)
42return Vector128.Ceiling(x.AsSingle()).As<float, T>(); 47return Vector128.Ceiling(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Clamp.cs (3)
222public static Vector128<T> Invoke(Vector128<T> x, Vector128<T> min, Vector128<T> max) => Vector128.Clamp(x, min, max); 235public static Vector128<T> Invoke(Vector128<T> min, Vector128<T> max, Vector128<T> x) => Vector128.Clamp(x, min, max); 248public static Vector128<T> Invoke(Vector128<T> max, Vector128<T> x, Vector128<T> min) => Vector128.Clamp(x, min, max);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (46)
168public static Vector128<float> Invoke(Vector128<int> x) => Vector128.ConvertToSingle(x); 179public static Vector128<float> Invoke(Vector128<uint> x) => Vector128.ConvertToSingle(x); 190public static Vector128<double> Invoke(Vector128<ulong> x) => Vector128.ConvertToDouble(x); 201public static Vector128<double> Invoke(Vector128<long> x) => Vector128.ConvertToDouble(x); 212public static (Vector128<double> Lower, Vector128<double> Upper) Invoke(Vector128<float> x) => Vector128.Widen(x); 223public static Vector128<float> Invoke(Vector128<double> lower, Vector128<double> upper) => Vector128.Narrow(lower, upper); 234public static (Vector128<ushort> Lower, Vector128<ushort> Upper) Invoke(Vector128<byte> x) => Vector128.Widen(x); 249(Vector128<ushort> Lower, Vector128<ushort> Upper) ushorts = Vector128.Widen(x); 250(Vector128<uint> Lower, Vector128<uint> Upper) uintsLower = Vector128.Widen(ushorts.Lower); 251(Vector128<uint> Lower, Vector128<uint> Upper) uintsUpper = Vector128.Widen(ushorts.Upper); 286Vector128.ConvertToSingle(results.Item1), 287Vector128.ConvertToSingle(results.Item2), 288Vector128.ConvertToSingle(results.Item3), 289Vector128.ConvertToSingle(results.Item4) 324public static (Vector128<short> Lower, Vector128<short> Upper) Invoke(Vector128<sbyte> x) => Vector128.Widen(x); 335public static (Vector128<uint> Lower, Vector128<uint> Upper) Invoke(Vector128<ushort> x) => Vector128.Widen(x); 346public static (Vector128<int> Lower, Vector128<int> Upper) Invoke(Vector128<short> x) => Vector128.Widen(x); 357public static (Vector128<ulong> Lower, Vector128<ulong> Upper) Invoke(Vector128<uint> x) => Vector128.Widen(x); 368public static (Vector128<long> Lower, Vector128<long> Upper) Invoke(Vector128<int> x) => Vector128.Widen(x); 394(Vector128<int> lowerInt32, Vector128<int> upperInt32) = Vector128.Widen(x); 402Vector128<uint> sign = value & Vector128.Create(SingleSignMask); 408Vector128<uint> offsetExponent = bitValueInProcess & Vector128.Create(HalfExponentMask); 411Vector128<uint> subnormalMask = Vector128.Equals(offsetExponent, Vector128<uint>.Zero); 414Vector128<uint> infinityOrNaNMask = Vector128.Equals(offsetExponent, Vector128.Create(HalfExponentMask)); 417Vector128<uint> maskedExponentLowerBound = subnormalMask & Vector128.Create(ExponentLowerBound); 420Vector128<uint> offsetMaskedExponentLowerBound = Vector128.Create(ExponentOffset) | maskedExponentLowerBound; 423bitValueInProcess = Vector128.ShiftLeft(bitValueInProcess, 13); 426offsetMaskedExponentLowerBound = Vector128.ConditionalSelect(Vector128.Equals(infinityOrNaNMask, Vector128<uint>.Zero), 428Vector128.ShiftLeft(offsetMaskedExponentLowerBound, 1)); 431bitValueInProcess &= Vector128.Create(HalfToSingleBitsMask); 575return Vector128.Narrow( 584Vector128<uint> sign = Vector128.ShiftRightLogical(bitValue & Vector128.Create(SingleSignMask), 16); 587Vector128<uint> realMask = Vector128.Equals(value, value).AsUInt32(); 590value = Vector128.Abs(value); 593value = Vector128.Min(Vector128.Create(MaxHalfValueBelowInfinity), value); 596Vector128<uint> exponentOffset0 = Vector128.Max(value, Vector128.Create(MinExp).AsSingle()).AsUInt32(); 599exponentOffset0 &= Vector128.Create(SingleBiasedExponentMask); 602exponentOffset0 += Vector128.Create(Exponent13); 609Vector128<uint> maskedHalfExponentForNaN = ~realMask & Vector128.Create(ExponentMask); 612bitValue -= Vector128.Create(Exponent126); 615Vector128<uint> newExponent = Vector128.ShiftRightLogical(bitValue, 13);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (6)
41return Vector128.IsNegative(Vector128<TTo>.AllBitsSet) != Vector128<TTo>.Zero ? 42Vector128.ConvertToInt32(x.AsSingle()).As<int, TTo>() : 43Vector128.ConvertToUInt32(x.AsSingle()).As<uint, TTo>(); 48return Vector128.IsNegative(Vector128<TTo>.AllBitsSet) != Vector128<TTo>.Zero ? 49Vector128.ConvertToInt64(x.AsDouble()).As<long, TTo>() : 50Vector128.ConvertToUInt64(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (6)
41return Vector128.IsNegative(Vector128<TTo>.AllBitsSet) != Vector128<TTo>.Zero ? 42Vector128.ConvertToInt32Native(x.AsSingle()).As<int, TTo>() : 43Vector128.ConvertToUInt32Native(x.AsSingle()).As<uint, TTo>(); 48return Vector128.IsNegative(Vector128<TTo>.AllBitsSet) != Vector128<TTo>.Zero ? 49Vector128.ConvertToInt64Native(x.AsDouble()).As<long, TTo>() : 50Vector128.ConvertToUInt64Native(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (10)
110public static Vector128<int> Invoke(Vector128<float> x) => Vector128.ConvertToInt32(x); 122public static Vector128<uint> Invoke(Vector128<float> x) => Vector128.ConvertToUInt32(x); 134public static Vector128<ulong> Invoke(Vector128<double> x) => Vector128.ConvertToUInt64(x); 146public static Vector128<long> Invoke(Vector128<double> x) => Vector128.ConvertToInt64(x); 157public static Vector128<byte> Invoke(Vector128<ushort> lower, Vector128<ushort> upper) => Vector128.Narrow(lower, upper); 168public static Vector128<sbyte> Invoke(Vector128<short> lower, Vector128<short> upper) => Vector128.Narrow(lower, upper); 179public static Vector128<ushort> Invoke(Vector128<uint> lower, Vector128<uint> upper) => Vector128.Narrow(lower, upper); 190public static Vector128<short> Invoke(Vector128<int> lower, Vector128<int> upper) => Vector128.Narrow(lower, upper); 201public static Vector128<uint> Invoke(Vector128<ulong> lower, Vector128<ulong> upper) => Vector128.Narrow(lower, upper); 212public static Vector128<int> Invoke(Vector128<long> lower, Vector128<long> upper) => Vector128.Narrow(lower, upper);
System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs (1)
64return Vector128.CopySign(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (2)
79return Vector128.Cos(x.AsDouble()).As<double, T>(); 84return Vector128.Cos(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (8)
86Vector128<float> y = Vector128.Abs(x); 87Vector128<float> z = ExpOperator<float>.Invoke(y - Vector128.Create((float)Single_LOGV)); 88return (Vector128.Create((float)Single_HALFV) * (z + (Vector128.Create((float)Single_INVV2) / z))).As<float, T>(); 95Vector128<double> y = Vector128.Abs(x); 96Vector128<double> z = ExpOperator<double>.Invoke(y - Vector128.Create(Double_LOGV)); 97return (Vector128.Create(Double_HALFV) * (z + (Vector128.Create(Double_INVV2) / z))).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (13)
135if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 150Vector128.LoadUnsafe(ref xRef, (uint)i), 151Vector128.LoadUnsafe(ref yRef, (uint)i), 164Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count)) & remainderMask, 165Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<T>.Count)) & remainderMask, 285if (Vector128.IsHardwareAccelerated && x.Length >= Vector128<short>.Count) 300(Vector128<float> xVecLower, Vector128<float> xVecUpper) = WidenHalfAsInt16ToSingleOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)); 301(Vector128<float> yVecLower, Vector128<float> yVecUpper) = WidenHalfAsInt16ToSingleOperator.Invoke(Vector128.LoadUnsafe(ref yRef, (uint)i)); 316Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<short>.Count)) & remainderMask); 318Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<short>.Count)) & remainderMask); 376Vector128.Sum(dotProductVector) / (T.Sqrt(Vector128.Sum(xSumOfSquaresVector)) * T.Sqrt(Vector128.Sum(ySumOfSquaresVector)));
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (7)
50Vector128<T> xpi = x * Vector128.Create(T.Pi); 54if (Vector128.GreaterThanAny(xpi.AsUInt32() & Vector128.Create(CosOperatorSingle.SignMask), Vector128.Create(CosOperatorSingle.MaxVectorizedValue))) 62if (Vector128.GreaterThanAny(xpi.AsUInt64() & Vector128.Create(CosOperatorDouble.SignMask), Vector128.Create(CosOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (2)
43return Vector128.DegreesToRadians(x.AsDouble()).As<double, T>(); 48return Vector128.DegreesToRadians(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (2)
53return Vector128.Exp(x.AsDouble()).As<double, T>(); 58return Vector128.Exp(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs (1)
44public static Vector128<T> Invoke(Vector128<T> x) => ExpOperator<T>.Invoke(x * Vector128.Create(T.CreateTruncating(NaturalLog10)));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs (1)
44public static Vector128<T> Invoke(Vector128<T> x) => ExpOperator<T>.Invoke(x * Vector128.Create(T.CreateTruncating(NaturalLog2)));
System\Numerics\Tensors\netcore\TensorPrimitives.FloatHelpers.cs (6)
11Vector128.Create(TOperator.Invoke(floats[0]), TOperator.Invoke(floats[1]), TOperator.Invoke(floats[2]), TOperator.Invoke(floats[3])); 20Vector128.Create(TOperator.Invoke(doubles[0]), TOperator.Invoke(doubles[1])); 37Vector128.Create(firstRes0, firstRes1, firstRes2, firstRes3), 38Vector128.Create(secondRes0, secondRes1, secondRes2, secondRes3) 73Vector128.Create(firstRes0, firstRes1), 74Vector128.Create(secondRes0, secondRes1)
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (2)
42return Vector128.Floor(x.AsSingle()).As<float, T>(); 47return Vector128.Floor(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (2)
128return Vector128.FusedMultiplyAdd(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 133return Vector128.FusedMultiplyAdd(x.AsSingle(), y.AsSingle(), z.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Half.cs (1)
306Vector128.IsHardwareAccelerated &&
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (7)
75if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 153Vector128<T> xVec = Vector128.LoadUnsafe(ref xRef, (uint)i); 154Vector128<T> yVec = Vector128.LoadUnsafe(ref yRef, (uint)i); 156count += BitOperations.PopCount((~Vector128.Equals(xVec, yVec)).ExtractMostSignificantBits()); 165Vector128<T> xVec = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count)); 166Vector128<T> yVec = Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<T>.Count)); 172count += BitOperations.PopCount((~Vector128.Equals(xVec, yVec)).ExtractMostSignificantBits());
System\Numerics\Tensors\netcore\TensorPrimitives.Hypot.cs (2)
47return Vector128.Hypot(x.AsDouble(), y.AsDouble()).As<double, T>(); 52return Vector128.Hypot(x.AsSingle(), y.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (6)
54Vector128<T> equalResult = Vector128.IsPositive(x) & Vector128.IsNegative(y); 55return Vector128.GreaterThan(x, y) | (Vector128.Equals(x, y) & equalResult); 59return Vector128.GreaterThan(x, y); 115return Vector128.ConditionalSelect(mask, left, right);
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMaxMagnitude.cs (14)
62Vector128<T> xMag = Vector128.Abs(x), yMag = Vector128.Abs(y); 65Vector128<T> equalResult = Vector128.IsPositive(x) & Vector128.IsNegative(y); 66return Vector128.GreaterThan(xMag, yMag) | (Vector128.Equals(xMag, yMag) & equalResult); 75Vector128<T> equalResult = Vector128.IsPositive(x) & Vector128.IsNegative(y); 76Vector128<T> nonOverflowResult = Vector128.GreaterThan(xMag, yMag) | (Vector128.Equals(xMag, yMag) & equalResult); 77return Vector128.AndNot(nonOverflowResult | Vector128.IsNegative(xMag), Vector128.IsNegative(yMag)); 81return Vector128.GreaterThan(xMag, yMag);
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMin.cs (5)
53Vector128<T> equalResult = Vector128.IsNegative(x) & Vector128.IsPositive(y); 54return Vector128.LessThan(x, y) | (Vector128.Equals(x, y) & equalResult); 58return Vector128.LessThan(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMinMagnitude.cs (14)
62Vector128<T> xMag = Vector128.Abs(x), yMag = Vector128.Abs(y); 65Vector128<T> equalResult = Vector128.IsNegative(x) & Vector128.IsPositive(y); 66return Vector128.LessThan(xMag, yMag) | (Vector128.Equals(xMag, yMag) & equalResult); 75Vector128<T> equalResult = Vector128.IsNegative(x) & Vector128.IsPositive(y); 76Vector128<T> nonOverflowResult = Vector128.LessThan(xMag, yMag) | (Vector128.Equals(xMag, yMag) & equalResult); 77return Vector128.AndNot(nonOverflowResult | Vector128.IsNegative(yMag), Vector128.IsNegative(xMag)); 81return Vector128.LessThan(xMag, yMag);
System\Numerics\Tensors\netcore\TensorPrimitives.IsEvenInteger.cs (1)
51public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsEvenInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsFinite.cs (1)
70public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsFinite(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInfinity.cs (1)
57public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInteger.cs (1)
68public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNaN.cs (1)
68public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsNaN<T>(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNegative.cs (1)
72public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsNegative<T>(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNegativeInfinity.cs (1)
57public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsNegativeInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNormal.cs (1)
52public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsNormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsOddInteger.cs (1)
51public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsOddInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPositive.cs (1)
50public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsPositive<T>(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPositiveInfinity.cs (1)
57public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsPositiveInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPow2.cs (2)
55Vector128.Equals(x & (x - Vector128<T>.One), Vector128<T>.Zero) & 56Vector128.GreaterThan(x, Vector128<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.IsRealNumber.cs (1)
68public static Vector128<T> Invoke(Vector128<T> x) => ~Vector128.IsNaN(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsSubnormal.cs (1)
57public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsSubnormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsZero.cs (1)
50public static Vector128<T> Invoke(Vector128<T> x) => Vector128.Equals(x, Vector128<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (10)
46Vector128<byte> lookupVectorLow = Vector128.Create((byte)8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4); 47Vector128<byte> lookupVectorHigh = Vector128.Create((byte)3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); 48Vector128<byte> nibbleMask = Vector128.Create<byte>(0xF); 49Vector128<byte> permuteMask = Vector128.Create<byte>(0x80); 63Vector128<uint> lowHalf = Vector128.Create((uint)0x0000FFFF); 99v |= (v.AsUInt16() >> 1).AsByte() & Vector128.Create((byte)0x7F); 100v |= (v.AsUInt16() >> 2).AsByte() & Vector128.Create((byte)0x3F); 101v |= (v.AsUInt16() >> 4).AsByte() & Vector128.Create((byte)0x0F); 102return (Vector128.Create((byte)8) - PopCountOperator<byte>.Invoke(v)).As<byte, T>(); 112return (Vector128.Create((ushort)16) - PopCountOperator<ushort>.Invoke(v)).As<ushort, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (2)
107return Vector128.Lerp(x.AsDouble(), y.AsDouble(), amount.AsDouble()).As<double, T>(); 112return Vector128.Lerp(x.AsSingle(), y.AsSingle(), amount.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (2)
109return Vector128.Log(x.AsDouble()).As<double, T>(); 114return Vector128.Log(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (1)
48public static Vector128<T> Invoke(Vector128<T> x) => LogOperator<T>.Invoke(x) / Vector128.Create(T.CreateTruncating(NaturalLog10));
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (2)
55return Vector128.Log2(x.AsDouble()).As<double, T>(); 60return Vector128.Log2(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (8)
109public static Vector128<T> Invoke(Vector128<T> x, Vector128<T> y) => Vector128.Max(x, y); 271if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 277Vector128<T> result = Vector128.LoadUnsafe(ref xRef, 0); 284nanMask = Vector128.IsNaN(result); 298current = Vector128.LoadUnsafe(ref xRef, (uint)i); 303nanMask = Vector128.IsNaN(current); 317current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count)); 322nanMask = Vector128.IsNaN(current);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs (1)
99return Vector128.MaxMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitudeNumber.cs (1)
114return Vector128.MaxMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxNumber.cs (1)
107return Vector128.MaxNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs (1)
108public static Vector128<T> Invoke(Vector128<T> x, Vector128<T> y) => Vector128.Min(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs (1)
109return Vector128.MinMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitudeNumber.cs (1)
114return Vector128.MinMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinNumber.cs (1)
107return Vector128.MinNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (2)
128return Vector128.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 132return Vector128.MultiplyAddEstimate(x.AsSingle(), y.AsSingle(), z.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (11)
92Vector128<byte> c1 = Vector128.Create((byte)0x55); 93Vector128<byte> c2 = Vector128.Create((byte)0x33); 94Vector128<byte> c3 = Vector128.Create((byte)0x0F); 108Vector128<ushort> c1 = Vector128.Create((ushort)0x5555); 109Vector128<ushort> c2 = Vector128.Create((ushort)0x3333); 110Vector128<ushort> c3 = Vector128.Create((ushort)0x0F0F); 111Vector128<ushort> c4 = Vector128.Create((ushort)0x0101); 122Vector128<uint> c1 = Vector128.Create(0x55555555u); 123Vector128<uint> c2 = Vector128.Create(0x33333333u); 124Vector128<uint> c3 = Vector128.Create(0x0F0F0F0Fu); 125Vector128<uint> c4 = Vector128.Create(0x01010101u);
System\Numerics\Tensors\netcore\TensorPrimitives.RadiansToDegrees.cs (2)
36return Vector128.RadiansToDegrees(x.AsDouble()).As<double, T>(); 41return Vector128.RadiansToDegrees(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (2)
113public static Vector128<T> Invoke(Vector128<T> x) => Vector128<T>.One / Vector128.Sqrt(x); 207return Vector128<T>.One / Vector128.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs (2)
39return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.AsSingle()) / Vector128.Create((float)_n)).As<float, T>(); 44return ExpOperator<double>.Invoke(LogOperator<double>.Invoke(x.AsDouble()) / Vector128.Create((double)_n)).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (4)
150return Vector128.Round(x.AsDouble()).As<double, T>(); 155return Vector128.Round(x.AsSingle()).As<float, T>(); 202return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector128.Create(0.49999997f), x.AsSingle())).As<float, T>(); 212return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector128.Create(0.49999999999999994), x.AsDouble())).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.ScaleB.cs (1)
34public Vector128<T> Invoke(Vector128<T> x) => x * Vector128.Create(_pow2n);
System\Numerics\Tensors\netcore\TensorPrimitives.Sigmoid.cs (2)
46public static Vector128<T> Invoke(Vector128<T> x) => Vector128.Create(T.One) / (Vector128.Create(T.One) + ExpOperator<T>.Invoke(-x));
System\Numerics\Tensors\netcore\TensorPrimitives.Sign.cs (9)
40return Vector128.ConditionalSelect(Vector128.Equals(x, Vector128<T>.Zero).AsInt32(), 51if (Vector128.EqualsAny(Vector128.IsNaN(x).AsInt32(), Vector128<int>.AllBitsSet)) 56return Vector128.ConditionalSelect(Vector128.LessThan(x, Vector128<T>.Zero).AsInt32(), 57Vector128.Create(-1), 58Vector128.ConditionalSelect(Vector128.GreaterThan(x, Vector128<T>.Zero).AsInt32(),
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (2)
69return Vector128.Sin(x.AsDouble()).As<double, T>(); 74return Vector128.Sin(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (10)
68Vector128<float> y = Vector128.Abs(x); 69Vector128<float> z = ExpOperator<float>.Invoke(y - Vector128.Create((float)Single_LOGV)); 70Vector128<float> result = Vector128.Create((float)Single_HALFV) * (z - (Vector128.Create((float)Single_INVV2) / z)); 71Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 79Vector128<double> y = Vector128.Abs(x); 80Vector128<double> z = ExpOperator<double>.Invoke(y - Vector128.Create(Double_LOGV)); 81Vector128<double> result = Vector128.Create(Double_HALFV) * (z - (Vector128.Create(Double_INVV2) / z)); 82Vector128<ulong> sign = x.AsUInt64() & Vector128.Create(~(ulong)long.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (7)
50Vector128<T> xpi = x * Vector128.Create(T.Pi); 54if (Vector128.GreaterThanAny(xpi.AsUInt32() & Vector128.Create(SinOperatorSingle.SignMask), Vector128.Create(SinOperatorSingle.MaxVectorizedValue))) 62if (Vector128.GreaterThanAny(xpi.AsUInt64() & Vector128.Create(SinOperatorDouble.SignMask), Vector128.Create(SinOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.Sqrt.cs (1)
37public static Vector128<T> Invoke(Vector128<T> x) => Vector128.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
50Vector128<T> diff = x - Vector128.Create(_subtrahend);
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (47)
130Vector128<float> uxMasked = Vector128.Abs(x); 131if (Vector128.GreaterThanAny(uxMasked.AsUInt32(), Vector128.Create(MaxVectorizedValue))) 136Vector128<float> dn = MultiplyAddEstimateOperator<float>.Invoke(uxMasked, Vector128.Create(2 / float.Pi), Vector128.Create(AlmHuge)); 138dn -= Vector128.Create(AlmHuge); 141f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector128.Create(-float.Pi / 2), f); 142f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector128.Create(Pi_Tail2), f); 143f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector128.Create(Pi_Tail3), f); 150Vector128<float> a1 = MultiplyAddEstimateOperator<float>.Invoke(Vector128.Create(C2), f2, Vector128.Create(C1)); 151Vector128<float> a2 = MultiplyAddEstimateOperator<float>.Invoke(Vector128.Create(C4), f2, Vector128.Create(C3)); 152Vector128<float> a3 = MultiplyAddEstimateOperator<float>.Invoke(Vector128.Create(C6), f2, Vector128.Create(C5)); 154Vector128<float> b2 = MultiplyAddEstimateOperator<float>.Invoke(f8, a3, f12 * Vector128.Create(C7)); 157Vector128<float> result = (poly.AsUInt32() ^ (x.AsUInt32() & Vector128.Create(~SignMask))).AsSingle(); 158return Vector128.ConditionalSelect(Vector128.Equals(odd, Vector128<uint>.Zero).AsSingle(), 160Vector128.Create(-1f) / result); 263Vector128<double> uxMasked = Vector128.Abs(x); 264if (Vector128.GreaterThanAny(uxMasked.AsUInt64(), Vector128.Create(MaxVectorizedValue))) 270Vector128<double> dn = MultiplyAddEstimateOperator<double>.Invoke(uxMasked, Vector128.Create(2 / double.Pi), Vector128.Create(AlmHuge)); 272dn -= Vector128.Create(AlmHuge); 276f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector128.Create(-double.Pi / 2), f); 277f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector128.Create(-HalfPi2), f); 278f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector128.Create(-HalfPi3), f); 289Vector128<double> a1 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C3), g, Vector128.Create(C1)); 290Vector128<double> a2 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C7), g, Vector128.Create(C5)); 291Vector128<double> a3 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C11), g, Vector128.Create(C9)); 292Vector128<double> a4 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C15), g, Vector128.Create(C13)); 293Vector128<double> a5 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C19), g, Vector128.Create(C17)); 294Vector128<double> a6 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C23), g, Vector128.Create(C21)); 295Vector128<double> a7 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C27), g, Vector128.Create(C25)); 302Vector128<double> result = (poly.AsUInt64() ^ (x.AsUInt64() & Vector128.Create(~SignMask))).AsDouble(); 303return Vector128.ConditionalSelect(Vector128.Equals(odd, Vector128<ulong>.Zero).AsDouble(), 305Vector128.Create(-1.0) / result);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (8)
76Vector128<float> y = Vector128.Abs(x); 77Vector128<float> z = ExpM1Operator<float>.Invoke(Vector128.Create(-2f) * y); 78Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 79return (sign ^ (-z / (z + Vector128.Create(2f))).AsUInt32()).As<uint, T>(); 85Vector128<double> y = Vector128.Abs(x); 86Vector128<double> z = ExpM1Operator<double>.Invoke(Vector128.Create(-2d) * y); 87Vector128<ulong> sign = x.AsUInt64() & Vector128.Create(~(ulong)long.MaxValue); 88return (sign ^ (-z / (z + Vector128.Create(2d))).AsUInt64()).As<ulong, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
44return Vector128.Truncate(x.AsDouble()).As<double, T>(); 49return Vector128.Truncate(x.AsSingle()).As<float, T>();
System.Private.CoreLib (2221)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (30)
107Vector128<byte> shiftedSrc = Vector128.ShiftRightLogical(src.AsUInt64(), 4).AsByte(); 108Vector128<byte> lowNibbles = Vector128.UnpackLow(shiftedSrc, src); 109Vector128<byte> highNibbles = Vector128.UnpackHigh(shiftedSrc, src); 112Vector128.ShuffleNative(hexMap, lowNibbles & Vector128.Create((byte)0xF)), 113Vector128.ShuffleNative(hexMap, highNibbles & Vector128.Create((byte)0xF)) 128Vector128.Create((byte)'0', (byte)'1', (byte)'2', (byte)'3', 132Vector128.Create((byte)'0', (byte)'1', (byte)'2', (byte)'3', 150vec = Vector128.CreateScalar(Unsafe.ReadUnaligned<ulong>(ref Unsafe.Add(ref srcRef, pos))).AsByte(); 155vec = Vector128.CreateScalar(Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref srcRef, pos))).AsByte(); 168Vector128.WidenLower(hexLow).As<ushort, TChar>().StoreUnsafe(ref destRef, pos * 2); 337vec = Vector128.LoadUnsafe(ref srcRef, offset).AsByte(); 349Vector128<ushort> vec1 = Vector128.LoadUnsafe(ref srcRef, offset).AsUInt16(); 350Vector128<ushort> vec2 = Vector128.LoadUnsafe(ref srcRef, offset + (nuint)Vector128<ushort>.Count).AsUInt16(); 364Vector128<byte> t1 = vec + Vector128.Create<byte>(0xFF - '9'); 368Vector128<byte> t2 = Vector128.SubtractSaturate(t1, Vector128.Create<byte>(6)); 372Vector128<byte> t3 = (vec & Vector128.Create<byte>(0xDF)) - Vector128.Create((byte)'A'); 376Vector128<byte> t4 = Vector128.AddSaturate(t3, Vector128.Create<byte>(10)); 381Vector128<byte> nibbles = Vector128.Min(t2 - Vector128.Create<byte>(0xF0), t4); 384if (Vector128.AddSaturate(nibbles, Vector128.Create<byte>(127 - 15)).ExtractMostSignificantBits() != 0) 393output = Ssse3.MultiplyAddAdjacent(nibbles, Vector128.Create<short>(0x0110).AsSByte()).AsByte(); 407Vector128<byte> zipped = PackedSimd.BitwiseSelect(nibbles, shiftedNibbles, Vector128.Create<ushort>(0xFF00).AsByte()); 418output = Vector128.Shuffle(output, Vector128.Create((byte)0, 2, 4, 6, 8, 10, 12, 14, 0, 0, 0, 0, 0, 0, 0, 0));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (12)
250Vector128.ShiftLeft(vector, 8) | Vector128.ShiftRightLogical(vector, 8); 264Vector128.Shuffle(vector.AsByte(), Vector128.Create((byte)3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12)).AsInt32(); 278Vector128.Shuffle(vector.AsByte(), Vector128.Create((byte)7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8)).AsInt64(); 317if (Vector128.IsHardwareAccelerated) 321Vector128.StoreUnsafe(TReverser.Reverse(Vector128.LoadUnsafe(ref sourceRef, (uint)i)), ref destRef, (uint)i); 349if (Vector128.IsHardwareAccelerated) 354Vector128.StoreUnsafe(TReverser.Reverse(Vector128.LoadUnsafe(ref sourceRef, (uint)i)), ref destRef, (uint)i);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (33)
1067Vector128.Create(decoder.AdvSimdLutOne3).AsByte(), 1068Vector128.Create(0x37363534, 0x3B3A3938, 0xFFFF3D3C, 0xFFFFFFFF).AsByte()); 1075var decLutTwo = (Vector128.Create(0x0100FF00, 0x05040302, 0x09080706, 0x0D0C0B0A).AsByte(), 1076Vector128.Create(0x11100F0E, 0x15141312, 0x19181716, 0xFFFFFFFF).AsByte(), 1077Vector128.Create(decoder.AdvSimdLutTwo3Uint1, 0x1F1E1D1C, 0x23222120, 0x27262524).AsByte(), 1078Vector128.Create(0x2B2A2928, 0x2F2E2D2C, 0x33323130, 0xFFFFFFFF).AsByte()); 1082Vector128<byte> offset = Vector128.Create<byte>(63); 1141Vector128<byte> classified = (Vector128.GreaterThan(str1, offset) 1142| Vector128.GreaterThan(str2, offset) 1143| Vector128.GreaterThan(str3, offset) 1144| Vector128.GreaterThan(str4, offset)); 1253Vector128<byte> lutHi = Vector128.Create(decoder.Vector128LutHigh).AsByte(); 1254Vector128<byte> lutLo = Vector128.Create(decoder.Vector128LutLow).AsByte(); 1255Vector128<sbyte> lutShift = Vector128.Create(decoder.Vector128LutShift).AsSByte(); 1256Vector128<sbyte> packBytesMask = Vector128.Create(0x06000102, 0x090A0405, 0x0C0D0E08, 0xffffffff).AsSByte(); 1257Vector128<byte> mergeConstant0 = Vector128.Create(0x01400140).AsByte(); 1258Vector128<short> mergeConstant1 = Vector128.Create(0x00011000).AsInt16(); 1260Vector128<byte> mask2F = Vector128.Create(decoder.MaskSlashOrUnderscore); 1261Vector128<byte> mask8F = Vector128.Create((byte)0x8F); 1262Vector128<byte> shiftForUnderscore = Vector128.Create((byte)33); 1275Vector128<byte> hiNibbles = Vector128.ShiftRightLogical(str.AsInt32(), 4).AsByte() & mask2F; 1297merge_ab_and_bc = Vector128.Add(evens, odds).AsInt16(); 1303Vector128<ushort> evens = Vector128.ShiftLeft(u & Vector128.Create((ushort)0x00FF), 6); 1304Vector128<ushort> odds = Vector128.ShiftRightLogical(u, 8); 1327output = Vector128.Add(ievens, iodds).AsInt32(); 1333Vector128<uint> ievens = Vector128.ShiftLeft(m & Vector128.Create(0x0000FFFFu), 12); 1334Vector128<uint> iodds = Vector128.ShiftRightLogical(m, 16); 1507Vector128<byte> eq2F = Vector128.Equals(str, maskSlashOrUnderscore); 1567str = Vector128.LoadUnsafe(ref *src); 1754Vector128<ushort> utf16VectorLower = Vector128.LoadUnsafe(ref *src); 1755Vector128<ushort> utf16VectorUpper = Vector128.LoadUnsafe(ref *src, 8);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (26)
397Vector128<byte> tblEnc1 = Vector128.Create("ABCDEFGHIJKLMNOP"u8).AsByte(); 398Vector128<byte> tblEnc2 = Vector128.Create("QRSTUVWXYZabcdef"u8).AsByte(); 399Vector128<byte> tblEnc3 = Vector128.Create("ghijklmnopqrstuv"u8).AsByte(); 400Vector128<byte> tblEnc4 = Vector128.Create(encoder.AdvSimdLut4).AsByte(); 458Vector128<byte> shuffleVec = Vector128.Create(0x01020001, 0x04050304, 0x07080607, 0x0A0B090A).AsByte(); 459Vector128<byte> lut = Vector128.Create(0xFCFC4741, 0xFCFCFCFC, 0xFCFCFCFC, encoder.Ssse3AdvSimdLutE3).AsByte(); 460Vector128<byte> maskAC = Vector128.Create(0x0fc0fc00).AsByte(); 461Vector128<byte> maskBB = Vector128.Create(0x003f03f0).AsByte(); 462Vector128<ushort> shiftAC = Vector128.Create(0x04000040).AsUInt16(); 463Vector128<short> shiftBB = Vector128.Create(0x01000010).AsInt16(); 464Vector128<byte> const51 = Vector128.Create((byte)51); 465Vector128<sbyte> const25 = Vector128.Create((sbyte)25); 466Vector128<byte> mask8F = Vector128.Create((byte)0x8F); 475Vector128<byte> str = Vector128.LoadUnsafe(ref *src); 505Vector128<ushort> odd = Vector128.ShiftRightLogical(AdvSimd.Arm64.UnzipOdd(t0.AsUInt16(), t0.AsUInt16()), 6); 506Vector128<ushort> even = Vector128.ShiftRightLogical(AdvSimd.Arm64.UnzipEven(t0.AsUInt16(), t0.AsUInt16()), 10); 512Vector128<ushort> shr6 = Vector128.ShiftRightLogical(t0.AsUInt16(), 6); 513Vector128<ushort> shr10 = Vector128.ShiftRightLogical(t0.AsUInt16(), 10); 514t1 = Vector128.ConditionalSelect(Vector128.Create(0x0000FFFFu).AsUInt16(), shr10, shr6); 572Vector128<sbyte> mask = Vector128.GreaterThan(str.AsSByte(), const25); 877(Vector128<ushort> utf16LowVector, Vector128<ushort> utf16HighVector) = Vector128.Widen(str); 888(Vector128<ushort> utf16LowVector1, Vector128<ushort> utf16HighVector1) = Vector128.Widen(res1); 889(Vector128<ushort> utf16LowVector2, Vector128<ushort> utf16HighVector2) = Vector128.Widen(res2); 890(Vector128<ushort> utf16LowVector3, Vector128<ushort> utf16HighVector3) = Vector128.Widen(res3); 891(Vector128<ushort> utf16LowVector4, Vector128<ushort> utf16HighVector4) = Vector128.Widen(res4);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (4)
392Vector128<byte> below = Vector128.LessThan(str, lowerBound); 393Vector128<byte> above = Vector128.GreaterThan(str, upperBound); 394Vector128<byte> eq5F = Vector128.Equals(str, maskSlashOrUnderscore); 397Vector128<byte> outside = Vector128.AndNot(below | above, eq5F);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (15)
255else if (Vector128.IsHardwareAccelerated) 259Vector128<byte> lowerVector = Vector128.Create(valuesAsBytes); 260Vector128<byte> lowerIsFalse = Vector128.Equals(lowerVector, Vector128<byte>.Zero); 263Vector128<byte> upperVector = Vector128.Create(valuesAsBytes.Slice(Vector128<byte>.Count)); 264Vector128<byte> upperIsFalse = Vector128.Equals(upperVector, Vector128<byte>.Zero); 526else if (Vector128.IsHardwareAccelerated) 834Vector128<byte> lowerShuffleMask_CopyToBoolArray = Vector128.Create(0, 0x01010101_01010101).AsByte(); 835Vector128<byte> upperShuffleMask_CopyToBoolArray = Vector128.Create(0x02020202_02020202, 0x03030303_03030303).AsByte(); 884else if (Vector128.IsHardwareAccelerated && ((uint)_bitLength >= Vector128<byte>.Count * 2u)) 889Vector128<byte> bitMask128 = Vector128.Create(0x80402010_08040201).AsByte(); 896Vector128<int> scalar = Vector128.CreateScalarUnsafe(bits); 898Vector128<byte> shuffledLower = Vector128.Shuffle(scalar.AsByte(), lowerShuffleMask); 900Vector128<byte> normalizedLower = Vector128.Min(extractedLower, ones); 903Vector128<byte> shuffledHigher = Vector128.Shuffle(scalar.AsByte(), upperShuffleMask); 905Vector128<byte> normalizedHigher = Vector128.Min(extractedHigher, ones);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (12)
163if (!Vector128.IsHardwareAccelerated || length < Vector128<ushort>.Count) 374if (Vector128.IsHardwareAccelerated && 525Vector128<ushort> ch1 = Vector128.Create((ushort)valueChar); 526Vector128<ushort> ch2 = Vector128.Create((ushort)valueCharU); 537Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.BitwiseOr(Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance)), Vector128.Create((ushort)0x20))); 538Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.BitwiseOr(Vector128.LoadUnsafe(ref searchSpace, (nuint)offset), Vector128.Create((ushort)0x20)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (8)
109Debug.Assert(Vector128.IsHardwareAccelerated); 121vec1 = Vector128.LoadUnsafe(ref charA, i); 122vec2 = Vector128.LoadUnsafe(ref charB, i); 164if (!Vector128.IsHardwareAccelerated || (lengthA < Vector128<byte>.Count) || (lengthB < Vector128<byte>.Count)) 419Debug.Assert(Vector128.IsHardwareAccelerated); 431vec1 = Vector128.LoadUnsafe(ref source, i); 432vec2 = Vector128.LoadUnsafe(ref prefix, i); 474if (!Vector128.IsHardwareAccelerated || (sourceLength < Vector128<byte>.Count) || (prefixLength < Vector128<byte>.Count))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (17)
1091if (Vector128.IsHardwareAccelerated) 1380(Vector128<ushort> x0, Vector128<ushort> x1) = Vector128.Widen(vecX); 1381(Vector128<ushort> y0, Vector128<ushort> y1) = Vector128.Widen(vecY); 1385(Vector128<ushort> z0, Vector128<ushort> z1) = Vector128.Widen(vecZ); 1524Vector128<byte> hexMap = Vector128.Create( 1536hexLow = Vector128.Shuffle(hexLow.AsInt16(), Vector128.Create(3, 2, 1, 0, 5, 4, 7, 6)).AsByte(); 1548Vector128<byte> vecX = Vector128.Shuffle(hexLow, 1549Vector128.Create(0x706050403020100, 0xD0CFF0B0A0908FF).AsByte()); 1552Vector128<byte> vecY = Vector128.Shuffle(hexHigh, 1553Vector128.Create(0x7060504FF030201, 0xF0E0D0C0B0A0908).AsByte()); 1557Vector128<byte> dashesMask = Vector128.Create(0x00002D000000002D, 0x2D000000002D0000).AsByte(); 1566Vector128.Create(0x0D0CFF0B0A0908FF, 0xFF13121110FF0F0E).AsByte()); 1571Vector128<byte> mid1 = Vector128.Shuffle(hexLow, 1572Vector128.Create(0x0D0CFF0B0A0908FF, 0xFFFFFFFFFFFF0F0E).AsByte()); 1573Vector128<byte> mid2 = Vector128.Shuffle(hexHigh, 1574Vector128.Create(0xFFFFFFFFFFFFFFFF, 0xFF03020100FFFFFF).AsByte());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Math.cs (5)
365if (Vector128.IsHardwareAccelerated) 367return Vector128.ConditionalSelect(Vector128.CreateScalarUnsafe(-0.0), Vector128.CreateScalarUnsafe(y), Vector128.CreateScalarUnsafe(x)).ToScalar();
src\runtime\src\libraries\System.Private.CoreLib\src\System\MathF.cs (5)
117if (Vector128.IsHardwareAccelerated) 119return Vector128.ConditionalSelect(Vector128.CreateScalarUnsafe(-0.0f), Vector128.CreateScalarUnsafe(y), Vector128.CreateScalarUnsafe(x)).ToScalar();
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (4)
1925if (Vector128.IsHardwareAccelerated) 1996if (Vector128.IsHardwareAccelerated) 2067if (Vector128.IsHardwareAccelerated) 2138if (Vector128.IsHardwareAccelerated)
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.MinMax.cs (26)
211public static Vector128<T> Compare(Vector128<T> left, Vector128<T> right) => Vector128.Min(left, right); 219public static Vector128<T> Compare(Vector128<T> left, Vector128<T> right) => Vector128.Max(left, right); 240if (!Vector128.IsHardwareAccelerated || !Vector128<T>.IsSupported || span.Length < Vector128<T>.Count) 260Vector128<T> best = Vector128.Create(data); 265best = TMinMax.Compare(best, Vector128.Create(data)); 268best128 = TMinMax.Compare(best, Vector128.Create(span.Slice(span.Length - Vector128<T>.Count))); 320x = TMinMax.Compare(x, Vector128.Shuffle(x.AsByte(), 321Vector128.Create((byte)8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7)).As<byte, T>()); 322x = TMinMax.Compare(x, Vector128.Shuffle(x.AsByte(), 323Vector128.Create((byte)4, 5, 6, 7, 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>()); 324x = TMinMax.Compare(x, Vector128.Shuffle(x.AsByte(), 325Vector128.Create((byte)2, 3, 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>()); 326x = TMinMax.Compare(x, Vector128.Shuffle(x.AsByte(), 327Vector128.Create((byte)1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>()); 331x = TMinMax.Compare(x, Vector128.Shuffle(x.AsInt16(), 332Vector128.Create(4, 5, 6, 7, 0, 1, 2, 3)).As<short, T>()); 333x = TMinMax.Compare(x, Vector128.Shuffle(x.AsInt16(), 334Vector128.Create(2, 3, 0, 1, 4, 5, 6, 7)).As<short, T>()); 335x = TMinMax.Compare(x, Vector128.Shuffle(x.AsInt16(), 336Vector128.Create(1, 0, 2, 3, 4, 5, 6, 7)).As<short, T>()); 340x = TMinMax.Compare(x, Vector128.Shuffle(x.AsInt32(), Vector128.Create(2, 3, 0, 1)).As<int, T>()); 341x = TMinMax.Compare(x, Vector128.Shuffle(x.AsInt32(), Vector128.Create(1, 0, 3, 2)).As<int, T>()); 346x = TMinMax.Compare(x, Vector128.Shuffle(x.AsInt64(), Vector128.Create(1, 0)).As<long, T>());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.cs (2)
438return Vector128.MultiplyAddEstimate(matrix.Y.AsVector128Unsafe(), Vector128.Create(position.GetElement(1)), result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.cs (321)
171result.X = Vector128.CreateScalar(1.0f); 172result.Y = Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f); 173result.Z = Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f); 174result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 188return (impl.X == Vector128.CreateScalar(1.0f)) && 189(impl.Y == Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f)) && 190(impl.Z == Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f)) && 191(impl.W == Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f)); 625Vector128<float> vector = Vector128.Create(value); 650result.Z = Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f); 719result.X = Vector128.Create(m11, m12, m13, m14); 720result.Y = Vector128.Create(m21, m22, m23, m24); 721result.Z = Vector128.Create(m31, m32, m33, m34); 722result.W = Vector128.Create(m41, m42, m43, m44); 743axisZ = (Vector128.LengthSquared(axisZ) < BillboardEpsilon) ? -(cameraForwardVector.AsVector128()) : Vector128.Normalize(axisZ); 745Vector128<float> axisX = Vector128.Normalize(Vector3.Cross(cameraUpVector.AsVector128(), axisZ)); 774axisZ = (Vector128.LengthSquared(axisZ) < BillboardEpsilon) ? cameraForwardVector.AsVector128() : Vector128.Normalize(axisZ); 776Vector128<float> axisX = Vector128.Normalize(Vector3.Cross(cameraUpVector.AsVector128(), axisZ)); 806faceDir = (Vector128.LengthSquared(faceDir) < BillboardEpsilon) ? -cameraForwardVector.AsVector128() : Vector128.Normalize(faceDir); 810float dot = Vector128.Dot(axisY, faceDir); 826dot = Vector128.Dot(axisY, faceDir); 834faceDir = (float.Abs(axisY.GetElement(2)) > BillboardMinAngle) ? Vector128.CreateScalar(1.0f) : Vector128.Create(0.0f, 0.0f, -1.0f, 0.0f); 838Vector128<float> axisX = Vector128.Normalize(Vector3.Cross(axisY, faceDir)); 839Vector128<float> axisZ = Vector128.Normalize(Vector3.Cross(axisX, axisY)); 868faceDir = (Vector128.LengthSquared(faceDir) < BillboardEpsilon) ? cameraForwardVector.AsVector128() : Vector128.Normalize(faceDir); 872float dot = Vector128.Dot(axisY, faceDir); 888dot = Vector128.Dot(axisY, faceDir); 896faceDir = (float.Abs(axisY.GetElement(2)) > BillboardMinAngle) ? Vector128.Create(-1.0f, 0.0f, 0.0f, 0.0f) : Vector128.Create(0.0f, 0.0f, -1.0f, 0.0f); 900Vector128<float> axisX = Vector128.Normalize(Vector3.Cross(axisY, faceDir)); 901Vector128<float> axisZ = Vector128.Normalize(Vector3.Cross(axisX, axisY)); 947result.X = Vector128.Create( 953result.Y = Vector128.Create( 959result.Z = Vector128.Create( 965result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1035Vector128<float> axisZ = Vector128.Normalize(cameraDirection); 1036Vector128<float> axisX = Vector128.Normalize(Vector3.Cross(cameraUpVector, axisZ)); 1042result.X = axisX.WithElement(3, Vector128.Dot(axisX, negativeCameraPosition)); 1043result.Y = axisY.WithElement(3, Vector128.Dot(axisY, negativeCameraPosition)); 1044result.Z = axisZ.WithElement(3, Vector128.Dot(axisZ, negativeCameraPosition)); 1045result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1066result.X = Vector128.Create(2.0f / width, 0, 0, 0); 1067result.Y = Vector128.Create(0, 2.0f / height, 0, 0); 1068result.Z = Vector128.Create(0, 0, range, 0); 1069result.W = Vector128.Create(0, 0, range * zNearPlane, 1); 1090result.X = Vector128.Create(2.0f / width, 0, 0, 0); 1091result.Y = Vector128.Create(0, 2.0f / height, 0, 0); 1092result.Z = Vector128.Create(0, 0, range, 0); 1093result.W = Vector128.Create(0, 0, -range * zNearPlane, 1); 1117result.X = Vector128.Create(reciprocalWidth + reciprocalWidth, 0, 0, 0); 1118result.Y = Vector128.Create(0, reciprocalHeight + reciprocalHeight, 0, 0); 1119result.Z = Vector128.Create(0, 0, range, 0); 1120result.W = Vector128.Create( 1149result.X = Vector128.Create(reciprocalWidth + reciprocalWidth, 0, 0, 0); 1150result.Y = Vector128.Create(0, reciprocalHeight + reciprocalHeight, 0, 0); 1151result.Z = Vector128.Create(0, 0, range, 0); 1152result.W = Vector128.Create( 1187result.X = Vector128.Create(dblNearPlaneDistance / width, 0, 0, 0); 1188result.Y = Vector128.Create(0, dblNearPlaneDistance / height, 0, 0); 1189result.Z = Vector128.Create(0, 0, range, -1.0f); 1190result.W = Vector128.Create(0, 0, range * nearPlaneDistance, 0); 1220result.X = Vector128.Create(dblNearPlaneDistance / width, 0, 0, 0); 1221result.Y = Vector128.Create(0, dblNearPlaneDistance / height, 0, 0); 1222result.Z = Vector128.Create(0, 0, range, 1.0f); 1223result.W = Vector128.Create(0, 0, -range * nearPlaneDistance, 0); 1260result.X = Vector128.Create(width, 0, 0, 0); 1261result.Y = Vector128.Create(0, height, 0, 0); 1262result.Z = Vector128.Create(0, 0, range, -1.0f); 1263result.W = Vector128.Create(0, 0, range * nearPlaneDistance, 0); 1300result.X = Vector128.Create(width, 0, 0, 0); 1301result.Y = Vector128.Create(0, height, 0, 0); 1302result.Z = Vector128.Create(0, 0, range, 1.0f); 1303result.W = Vector128.Create(0, 0, -range * nearPlaneDistance, 0); 1337result.X = Vector128.Create(dblNearPlaneDistance * reciprocalWidth, 0, 0, 0); 1338result.Y = Vector128.Create(0, dblNearPlaneDistance * reciprocalHeight, 0, 0); 1339result.Z = Vector128.Create( 1345result.W = Vector128.Create(0, 0, range * nearPlaneDistance, 0); 1379result.X = Vector128.Create(dblNearPlaneDistance * reciprocalWidth, 0, 0, 0); 1380result.Y = Vector128.Create(0, dblNearPlaneDistance * reciprocalHeight, 0, 0); 1381result.Z = Vector128.Create( 1387result.W = Vector128.Create(0, 0, -range * nearPlaneDistance, 0); 1402Vector128<float> s = p * Vector128.Create(-2.0f, -2.0f, -2.0f, 0.0f); 1406result.X = Vector128.MultiplyAddEstimate(s, Vector128.Create(p.GetElement(0)), Vector128.CreateScalar(1.0f)); 1407result.Y = Vector128.MultiplyAddEstimate(s, Vector128.Create(p.GetElement(1)), Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f)); 1408result.Z = Vector128.MultiplyAddEstimate(s, Vector128.Create(p.GetElement(2)), Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f)); 1409result.W = Vector128.MultiplyAddEstimate(s, Vector128.Create(p.GetElement(3)), Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f)); 1429result.X = Vector128.CreateScalar(1.0f); 1430result.Y = Vector128.Create(0, c, s, 0); 1431result.Z = Vector128.Create(0, -s, c, 0); 1432result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1456result.X = Vector128.CreateScalar(1.0f); 1457result.Y = Vector128.Create(0, c, s, 0); 1458result.Z = Vector128.Create(0, -s, c, 0); 1459result.W = Vector128.Create(0, y, z, 1); 1479result.X = Vector128.Create(c, 0, -s, 0); 1480result.Y = Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f); 1481result.Z = Vector128.Create(s, 0, c, 0); 1482result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1506result.X = Vector128.Create(c, 0, -s, 0); 1507result.Y = Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f); 1508result.Z = Vector128.Create(s, 0, c, 0); 1509result.W = Vector128.Create(x, 0, z, 1); 1529result.X = Vector128.Create(c, s, 0, 0); 1530result.Y = Vector128.Create(-s, c, 0, 0); 1531result.Z = Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f); 1532result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1556result.X = Vector128.Create(c, s, 0, 0); 1557result.Y = Vector128.Create(-s, c, 0, 0); 1558result.Z = Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f); 1559result.W = Vector128.Create(x, y, 0, 1); 1574result.X = Vector128.Create(xScale, 0, 0, 0); 1575result.Y = Vector128.Create(0, yScale, 0, 0); 1576result.Z = Vector128.Create(0, 0, zScale, 0); 1577result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1593result.X = Vector128.Create(xScale, 0, 0, 0); 1594result.Y = Vector128.Create(0, yScale, 0, 0); 1595result.Z = Vector128.Create(0, 0, zScale, 0); 1596result.W = (centerPoint.AsVector128() * (Vector128<float>.One - Vector128.Create(xScale, yScale, zScale, 0))).WithElement(3, 1.0f); 1609result.X = Vector128.Create(scales.X, 0, 0, 0); 1610result.Y = Vector128.Create(0, scales.Y, 0, 0); 1611result.Z = Vector128.Create(0, 0, scales.Z, 0); 1612result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1626result.X = Vector128.Create(scales.X, 0, 0, 0); 1627result.Y = Vector128.Create(0, scales.Y, 0, 0); 1628result.Z = Vector128.Create(0, 0, scales.Z, 0); 1642result.X = Vector128.Create(scale, 0, 0, 0); 1643result.Y = Vector128.Create(0, scale, 0, 0); 1644result.Z = Vector128.Create(0, 0, scale, 0); 1645result.W = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 1659result.X = Vector128.Create(scale, 0, 0, 0); 1660result.Y = Vector128.Create(0, scale, 0, 0); 1661result.Z = Vector128.Create(0, 0, scale, 0); 1676float dot = Vector128.Dot(p, l); 1682result.X = Vector128.MultiplyAddEstimate(l, Vector128.Create(p.GetElement(0)), Vector128.Create(dot, 0, 0, 0)); 1683result.Y = Vector128.MultiplyAddEstimate(l, Vector128.Create(p.GetElement(1)), Vector128.Create(0, dot, 0, 0)); 1684result.Z = Vector128.MultiplyAddEstimate(l, Vector128.Create(p.GetElement(2)), Vector128.Create(0, 0, dot, 0)); 1685result.W = Vector128.MultiplyAddEstimate(l, Vector128.Create(p.GetElement(3)), Vector128.Create(0, 0, 0, dot)); 1698result.X = Vector128.CreateScalar(1.0f); 1699result.Y = Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f); 1700result.Z = Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f); 1716result.X = Vector128.CreateScalar(1.0f); 1717result.Y = Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f); 1718result.Z = Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f); 1719result.W = Vector128.Create(xPosition, yPosition, zPosition, 1); 1745result.W = Vector128.Create(width, height, 0f, 0f); 1746result.W *= Vector128.Create(0.5f, 0.5f, 0f, 0f); 1748result.X = Vector128.Create(result.W.GetElement(0), 0f, 0f, 0f); 1749result.Y = Vector128.Create(0f, -result.W.GetElement(1), 0f, 0f); 1750result.Z = Vector128.Create(0f, 0f, minDepth - maxDepth, 0f); 1751result.W += Vector128.Create(x, y, minDepth, 1f); 1777result.W = Vector128.Create(width, height, 0f, 0f); 1778result.W *= Vector128.Create(0.5f, 0.5f, 0f, 0f); 1780result.X = Vector128.Create(result.W.GetElement(0), 0f, 0f, 0f); 1781result.Y = Vector128.Create(0f, -result.W.GetElement(1), 0f, 0f); 1782result.Z = Vector128.Create(0f, 0f, maxDepth - minDepth, 0f); 1783result.W += Vector128.Create(x, y, minDepth, 1f); 1797Vector128<float> axisZ = Vector128.Normalize(-(forward.AsVector128())); 1798Vector128<float> axisX = Vector128.Normalize(Vector3.Cross(up.AsVector128(), axisZ)); 1826Vector128.Create(1.0f, 0.0f, 0.0f, 0.0f), 1827Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f), 1828Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f), 1844Vector128.Length(*(vectorBasis[0])), 1845Vector128.Length(*(vectorBasis[1])), 1846Vector128.Length(*(vectorBasis[2])), 1899*vectorBasis[a] = Vector128.Normalize(*vectorBasis[a]); 1903Vector128<float> fAbs = Vector128.Abs(*vectorBasis[a]); 1925*vectorBasis[b] = Vector128.Normalize(*vectorBasis[b]); 1932*vectorBasis[c] = Vector128.Normalize(*vectorBasis[c]); 1954rotation = Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f).AsQuaternion(); 2081Vector128<float> vTemp1 = Vector128.ConcatLowerLower(row1, row2); 2082Vector128<float> vTemp3 = Vector128.ConcatUpperUpper(row1, row2); 2083Vector128<float> vTemp2 = Vector128.ConcatLowerLower(row3, row4); 2084Vector128<float> vTemp4 = Vector128.ConcatUpperUpper(row3, row4); 2086row1 = Vector128.UnzipEven(vTemp1, vTemp2); 2087row2 = Vector128.UnzipOdd(vTemp1, vTemp2); 2088row3 = Vector128.UnzipEven(vTemp3, vTemp4); 2089row4 = Vector128.UnzipOdd(vTemp3, vTemp4); 2091Vector128<float> V00 = Vector128.Shuffle(row3, Vector128.Create(0, 0, 1, 1)); 2092Vector128<float> V10 = Vector128.Shuffle(row4, Vector128.Create(2, 3, 2, 3)); 2093Vector128<float> V01 = Vector128.Shuffle(row1, Vector128.Create(0, 0, 1, 1)); 2094Vector128<float> V11 = Vector128.Shuffle(row2, Vector128.Create(2, 3, 2, 3)); 2095Vector128<float> V02 = Vector128.UnzipEven(row3, row1); 2096Vector128<float> V12 = Vector128.UnzipOdd(row4, row2); 2102V00 = Vector128.Shuffle(row3, Vector128.Create(2, 3, 2, 3)); 2103V10 = Vector128.Shuffle(row4, Vector128.Create(0, 0, 1, 1)); 2104V01 = Vector128.Shuffle(row1, Vector128.Create(2, 3, 2, 3)); 2105V11 = Vector128.Shuffle(row2, Vector128.Create(0, 0, 1, 1)); 2106V02 = Vector128.UnzipOdd(row3, row1); 2107V12 = Vector128.UnzipEven(row4, row2); 2109D0 = Vector128.MultiplyAddEstimate(-V00, V10, D0); 2110D1 = Vector128.MultiplyAddEstimate(-V01, V11, D1); 2111D2 = Vector128.MultiplyAddEstimate(-V02, V12, D2); 2115V00 = Vector128.Shuffle(row2, Vector128.Create(1, 2, 0, 1)); 2117V01 = Vector128.Shuffle(row1, Vector128.Create(2, 0, 1, 0)); 2122V02 = Vector128.Shuffle(row4, Vector128.Create(1, 2, 0, 1)); 2124Vector128<float> V03 = Vector128.Shuffle(row3, Vector128.Create(2, 0, 1, 0)); 2134V00 = Vector128.Shuffle(row2, Vector128.Create(2, 3, 1, 2)); 2136V01 = Vector128.Shuffle(row1, Vector128.Create(3, 2, 3, 1)); 2141V02 = Vector128.Shuffle(row4, Vector128.Create(2, 3, 1, 2)); 2143V03 = Vector128.Shuffle(row3, Vector128.Create(3, 2, 3, 1)); 2146C0 = Vector128.MultiplyAddEstimate(-V00, V10, C0); 2147C2 = Vector128.MultiplyAddEstimate(-V01, V11, C2); 2148C4 = Vector128.MultiplyAddEstimate(-V02, V12, C4); 2149C6 = Vector128.MultiplyAddEstimate(-V03, V13, C6); 2151V00 = Vector128.Shuffle(row2, Vector128.Create(3, 0, 3, 0)); 2155V10 = Vector128.Shuffle(V10, Vector128.Create(0, 3, 2, 0)); 2156V01 = Vector128.Shuffle(row1, Vector128.Create(1, 3, 0, 2)); 2160V11 = Vector128.Shuffle(V11, Vector128.Create(3, 0, 1, 2)); 2161V02 = Vector128.Shuffle(row4, Vector128.Create(3, 0, 3, 0)); 2165V12 = Vector128.Shuffle(V12, Vector128.Create(0, 3, 2, 0)); 2166V03 = Vector128.Shuffle(row3, Vector128.Create(1, 3, 0, 2)); 2170V13 = Vector128.Shuffle(V13, Vector128.Create(3, 0, 1, 2)); 2194C0 = Vector128.Shuffle(C0, Vector128.Create(0, 2, 1, 3)); 2195C2 = Vector128.Shuffle(C2, Vector128.Create(0, 2, 1, 3)); 2196C4 = Vector128.Shuffle(C4, Vector128.Create(0, 2, 1, 3)); 2197C6 = Vector128.Shuffle(C6, Vector128.Create(0, 2, 1, 3)); 2237Vector128<float> vAmount = Vector128.Create(amount); 2241result.X = Vector128.Lerp(left.X, right.X, vAmount); 2242result.Y = Vector128.Lerp(left.Y, right.Y, vAmount); 2243result.Z = Vector128.Lerp(left.Z, right.Z, vAmount); 2244result.W = Vector128.Lerp(left.W, right.W, vAmount); 2313result.X = Vector128.Create( 2319result.Y = Vector128.Create( 2325result.Z = Vector128.Create( 2331result.W = Vector128.Create( 2360Vector128<float> lowerXZ = Vector128.ZipLower(x, z); // x[0], z[0], x[1], z[1] 2361Vector128<float> lowerYW = Vector128.ZipLower(y, w); // y[0], w[0], y[1], w[1] 2362Vector128<float> upperXZ = Vector128.ZipUpper(x, z); // x[2], z[2], x[3], z[3] 2363Vector128<float> upperYW = Vector128.ZipUpper(y, w); // y[2], w[2], y[3], w[3] 2365result.X = Vector128.ZipLower(lowerXZ, lowerYW); // x[0], y[0], z[0], w[0] 2366result.Y = Vector128.ZipUpper(lowerXZ, lowerYW); // x[1], y[1], z[1], w[1] 2367result.Z = Vector128.ZipLower(upperXZ, upperYW); // x[2], y[2], z[2], w[2] 2368result.W = Vector128.ZipUpper(upperXZ, upperYW); // x[3], y[3], z[3], w[3] 2432Vector128<float> z_kjji = Vector128.Shuffle(z, Vector128.Create(2, 1, 1, 0)); 2433Vector128<float> z_iiij = Vector128.Shuffle(z, Vector128.Create(0, 0, 0, 1)); 2434Vector128<float> w_ppop = Vector128.Shuffle(w, Vector128.Create(3, 3, 2, 3)); 2435Vector128<float> w_onpo = Vector128.Shuffle(w, Vector128.Create(2, 1, 3, 2)); 2436Vector128<float> z_llkl = Vector128.Shuffle(z, Vector128.Create(3, 3, 2, 3)); 2437Vector128<float> z_kjlk = Vector128.Shuffle(z, Vector128.Create(2, 1, 3, 2)); 2438Vector128<float> w_onnm = Vector128.Shuffle(w, Vector128.Create(2, 1, 1, 0)); 2439Vector128<float> w_mmmn = Vector128.Shuffle(w, Vector128.Create(0, 0, 0, 1)); 2440Vector128<float> y_feee = Vector128.Shuffle(y, Vector128.Create(1, 0, 0, 0)); 2441Vector128<float> y_ggff = Vector128.Shuffle(y, Vector128.Create(2, 2, 1, 1)); 2442Vector128<float> y_hhhg = Vector128.Shuffle(y, Vector128.Create(3, 3, 3, 2)); 2460Vector128<float> tmp3 = Vector128.Shuffle(tmp1, Vector128.Create(0, 0, 1, 2)); 2472Vector128<float> tmp5 = Vector128.Shuffle(tmp2, Vector128.Create(3, 0, 1, 1)); 2475Vector128<float> tmp7 = tmp6 - Vector128.Shuffle(tmp6, Vector128.Create(1, 0, 3, 0)); 2556return AdvSimd.Arm64.VectorTableLookup((lower.AsByte(), upper.AsByte()), ((Vector128.Create(xIndex, yIndex, zIndex, wIndex) * Vector128.Create(0x04040404)) + Vector128.Create(0x03020100, 0x03020100, 0x13121110, 0x13121110)).AsByte()).AsSingle(); 2560return PackedSimd.Shuffle(lower.AsByte(), upper.AsByte(), ((Vector128.Create(xIndex, yIndex, zIndex, wIndex) * Vector128.Create(0x04040404)) + Vector128.Create(0x03020100, 0x03020100, 0x13121110, 0x13121110)).AsByte()).AsSingle(); 2564return Vector128.ConcatLowerLower( 2565Vector128.Shuffle(lower, Vector128.Create(xIndex, yIndex, 0, 0)), 2566Vector128.Shuffle(upper, Vector128.Create(zIndex, wIndex, 0, 0))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Plane.cs (11)
77public static Plane Create(float x, float y, float z, float d) => Vector128.Create(x, y, z, d).AsPlane(); 93Vector128<float> normal = Vector128.Normalize(Vector3.Cross(point2 - point1, point3 - point1).WithElement(3, 0.0f)); 94return normal.WithElement(3, -Vector128.Dot(normal, point1.WithElement(3, 0.0f))); 103public static float Dot(Plane plane, Vector4 value) => Vector128.Dot(plane.AsVector128(), value.AsVector128()); 115return Vector128.Dot(plane.AsVector128(), value.AsVector128().WithElement(3, 1.0f)); 128return Vector128.Dot(plane.AsVector128().WithElement(3, 0.0f), value.AsVector128()); 143Vector128<float> lengthSquared = Vector128.Create(Vector128.LengthSquared(value.WithElement(3, 0.0f))); 145return Vector128.AndNot( 146(value / Vector128.Sqrt(lengthSquared)), 147Vector128.IsPositiveInfinity(lengthSquared)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Quaternion.cs (34)
67get => Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f).AsQuaternion(); 95get => this.AsVector128() == Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f); 189result = Vector128.MultiplyAddEstimate(Vector128.Shuffle(value1, Vector128.Create(3, 2, 1, 0)) * value2.GetElement(0), Vector128.Create(+1.0f, -1.0f, +1.0f, -1.0f), result); 190result = Vector128.MultiplyAddEstimate(Vector128.Shuffle(value1, Vector128.Create(2, 3, 0, 1)) * value2.GetElement(1), Vector128.Create(+1.0f, +1.0f, -1.0f, -1.0f), result); 191result = Vector128.MultiplyAddEstimate(Vector128.Shuffle(value1, Vector128.Create(1, 0, 3, 2)) * value2.GetElement(2), Vector128.Create(-1.0f, +1.0f, +1.0f, -1.0f), result); 207return value * Vector128.Create(-1.0f, -1.0f, -1.0f, 1.0f); 218public static Quaternion Create(float x, float y, float z, float w) => Vector128.Create(x, y, z, w).AsQuaternion(); 243return (axis * Vector128.Create(s)).WithElement(3, c); 336public static float Dot(Quaternion quaternion1, Quaternion quaternion2) => Vector128.Dot(quaternion1.AsVector128(), quaternion2.AsVector128()); 357Vector128<float> lengthSquared = Vector128.Create(Vector128.LengthSquared(value)); 358return Vector128.AndNot( 360Vector128.LessThanOrEqual(lengthSquared, Vector128.Create(Epsilon)) 370public static Quaternion Lerp(Quaternion quaternion1, Quaternion quaternion2, float amount) => Lerp(quaternion1.AsVector128(), quaternion2.AsVector128(), Vector128.Create(amount)).AsQuaternion(); 375Vector128<float> temp = Vector128.ConditionalSelect( 376Vector128.IsPositive(Vector128.Create(Vector128.Dot(quaternion1, quaternion2))), 380return Vector128.Normalize( 381Vector128.MultiplyAddEstimate(quaternion1, Vector128<float>.One - amount, temp * amount) 398public static Quaternion Multiply(Quaternion value1, float value2) => (value1.AsVector128() * Vector128.Create(value2)).AsQuaternion(); 412public static Quaternion Normalize(Quaternion value) => Vector128.Normalize(value.AsVector128()).AsQuaternion(); 482public readonly float Length() => Vector128.Length(this.AsVector128()); 488public readonly float LengthSquared() => Vector128.LengthSquared(this.AsVector128());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (110)
31/// <inheritdoc cref="Vector128.get_E{T}" /> 38/// <inheritdoc cref="Vector128.get_Pi{T}" /> 45/// <inheritdoc cref="Vector128.get_Tau{T}" /> 57/// <inheritdoc cref="Vector128.get_Epsilon{T}" /> 64/// <inheritdoc cref="Vector128.get_NaN{T}" /> 71/// <inheritdoc cref="Vector128.get_NegativeInfinity{T}" /> 78/// <inheritdoc cref="Vector128.get_NegativeZero{T}" /> 85/// <inheritdoc cref="Vector128.get_PositiveInfinity{T}" /> 97/// <inheritdoc cref="Vector128.get_NegativeOne{T}" /> 104/// <inheritdoc cref="Vector128.get_SignSequence{T}" /> 139/// <inheritdoc cref="Vector128.Add{T}(Vector128{T}, Vector128{T})" /> 143/// <inheritdoc cref="Vector128.AddSaturate{T}(Vector128{T}, Vector128{T})" /> 166/// <inheritdoc cref="Vector128.All{T}(Vector128{T}, T)" /> 171/// <inheritdoc cref="Vector128.AllWhereAllBitsSet{T}(Vector128{T})" /> 198/// <inheritdoc cref="Vector128.Any{T}(Vector128{T}, T)" /> 203/// <inheritdoc cref="Vector128.AnyWhereAllBitsSet{T}(Vector128{T})" /> 418/// <inheritdoc cref="Vector128.Clamp{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 426/// <inheritdoc cref="Vector128.ClampNative{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 481return Vector128.ConvertToDouble(value.AsVector128()).AsVector(); 504return Vector128.ConvertToDouble(value.AsVector128()).AsVector(); 612return Vector128.ConvertToSingle(value.AsVector128()).AsVector(); 702/// <inheritdoc cref="Vector128.Cos(Vector128{double})" /> 716/// <inheritdoc cref="Vector128.Cos(Vector128{float})" /> 730/// <inheritdoc cref="Vector128.CopySign{T}(Vector128{T}, Vector128{T})" /> 759/// <inheritdoc cref="Vector128.Count{T}(Vector128{T}, T)" /> 775return Vector128.Count(vector.AsVector128(), value); 779/// <inheritdoc cref="Vector128.CountWhereAllBitsSet{T}(Vector128{T})" /> 894return Vector128.CreateGeometricSequence(initial, multiplier).AsVector(); 949return Vector128.ConcatLowerLower(left.AsVector128(), right.AsVector128()).AsVector(); 973return Vector128.ConcatUpperLower(left.AsVector128(), right.AsVector128()).AsVector(); 997return Vector128.ConcatUpperUpper(left.AsVector128(), right.AsVector128()).AsVector(); 1021return Vector128.ConcatLowerUpper(left.AsVector128(), right.AsVector128()).AsVector(); 1045return Vector128.ZipLower(left.AsVector128(), right.AsVector128()).AsVector(); 1069return Vector128.ZipUpper(left.AsVector128(), right.AsVector128()).AsVector(); 1102return Vector128.UnzipEven(left.AsVector128(), right.AsVector128()).AsVector(); 1126return Vector128.UnzipOdd(left.AsVector128(), right.AsVector128()).AsVector(); 1158return Vector128.Reverse(vector.AsVector128()).AsVector(); 1176/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{double})" /> 1191/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{float})" /> 1320/// <inheritdoc cref="Vector128.Exp(Vector128{double})" /> 1334/// <inheritdoc cref="Vector128.Exp(Vector128{float})" /> 1668/// <inheritdoc cref="Vector128.Hypot(Vector128{double}, Vector128{double})" /> 1682/// <inheritdoc cref="Vector128.Hypot(Vector128{float}, Vector128{float})" /> 1696/// <inheritdoc cref="Vector128.IndexOf{T}(Vector128{T}, T)" /> 1712return Vector128.IndexOf(vector.AsVector128(), value); 1716/// <inheritdoc cref="Vector128.IndexOfWhereAllBitsSet{T}(Vector128{T})" /> 1735/// <inheritdoc cref="Vector128.IsEvenInteger{T}(Vector128{T})" /> 1751/// <inheritdoc cref="Vector128.IsFinite{T}(Vector128{T})" /> 1767/// <inheritdoc cref="Vector128.IsInfinity{T}(Vector128{T})" /> 1779/// <inheritdoc cref="Vector128.IsInteger{T}(Vector128{T})" /> 1791/// <inheritdoc cref="Vector128.IsNaN{T}(Vector128{T})" /> 1803/// <inheritdoc cref="Vector128.IsNegative{T}(Vector128{T})" /> 1826/// <inheritdoc cref="Vector128.IsNegativeInfinity{T}(Vector128{T})" /> 1842/// <inheritdoc cref="Vector128.IsNormal{T}(Vector128{T})" /> 1858/// <inheritdoc cref="Vector128.IsOddInteger{T}(Vector128{T})" /> 1874/// <inheritdoc cref="Vector128.IsPositive{T}(Vector128{T})" /> 1897/// <inheritdoc cref="Vector128.IsPositiveInfinity{T}(Vector128{T})" /> 1913/// <inheritdoc cref="Vector128.IsSubnormal{T}(Vector128{T})" /> 1929/// <inheritdoc cref="Vector128.IsZero{T}(Vector128{T})" /> 1934/// <inheritdoc cref="Vector128.LastIndexOf{T}(Vector128{T}, T)" /> 1950return Vector128.LastIndexOf(vector.AsVector128(), value); 1954/// <inheritdoc cref="Vector128.LastIndexOfWhereAllBitsSet{T}(Vector128{T})" /> 2284/// <inheritdoc cref="Vector128.Log(Vector128{double})" /> 2298/// <inheritdoc cref="Vector128.Log(Vector128{float})" /> 2326/// <inheritdoc cref="Vector128.Log2(Vector128{double})" /> 2340/// <inheritdoc cref="Vector128.Log2(Vector128{float})" /> 2354/// <inheritdoc cref="Vector128.Max{T}(Vector128{T}, Vector128{T})" /> 2377/// <inheritdoc cref="Vector128.MaxMagnitude{T}(Vector128{T}, Vector128{T})" /> 2400/// <inheritdoc cref="Vector128.MaxMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2423/// <inheritdoc cref="Vector128.MaxNative{T}(Vector128{T}, Vector128{T})" /> 2446/// <inheritdoc cref="Vector128.MaxNumber{T}(Vector128{T}, Vector128{T})" /> 2469/// <inheritdoc cref="Vector128.Min{T}(Vector128{T}, Vector128{T})" /> 2492/// <inheritdoc cref="Vector128.MinMagnitude{T}(Vector128{T}, Vector128{T})" /> 2515/// <inheritdoc cref="Vector128.MinMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2538/// <inheritdoc cref="Vector128.MinNative{T}(Vector128{T}, Vector128{T})" /> 2561/// <inheritdoc cref="Vector128.MinNumber{T}(Vector128{T}, Vector128{T})" /> 2623/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{double}, Vector128{double}, Vector128{double})" /> 2639/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 2678/// <inheritdoc cref="Vector128.Narrow(Vector128{double}, Vector128{double})"/> 2684/// <inheritdoc cref="Vector128.Narrow(Vector128{short}, Vector128{short})"/> 2691/// <inheritdoc cref="Vector128.Narrow(Vector128{int}, Vector128{int})"/> 2697/// <inheritdoc cref="Vector128.Narrow(Vector128{long}, Vector128{long})"/> 2703/// <inheritdoc cref="Vector128.Narrow(Vector128{ushort}, Vector128{ushort})"/> 2710/// <inheritdoc cref="Vector128.Narrow(Vector128{uint}, Vector128{uint})"/> 2717/// <inheritdoc cref="Vector128.Narrow(Vector128{ulong}, Vector128{ulong})"/> 2747/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{double}, Vector128{double})"/> 2753/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{short}, Vector128{short})"/> 2760/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{int}, Vector128{int})"/> 2766/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{long}, Vector128{long})"/> 2772/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ushort}, Vector128{ushort})"/> 2779/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{uint}, Vector128{uint})"/> 2786/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ulong}, Vector128{ulong})"/> 2800/// <inheritdoc cref="Vector128.None{T}(Vector128{T}, T)" /> 2805/// <inheritdoc cref="Vector128.NoneWhereAllBitsSet{T}(Vector128{T})" /> 2845/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{double})" /> 2859/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{float})" /> 2895/// <inheritdoc cref="Vector128.Round(Vector128{double})" /> 2899/// <inheritdoc cref="Vector128.Round(Vector128{float})" /> 2903/// <inheritdoc cref="Vector128.Round(Vector128{double}, MidpointRounding)" /> 2907/// <inheritdoc cref="Vector128.Round(Vector128{float}, MidpointRounding)" /> 2992return Vector128.ShiftLeft(vector.AsVector128(), shiftCount.AsVector128()).AsVector(); 3018return Vector128.ShiftLeft(vector.AsVector128(), shiftCount.AsVector128()).AsVector(); 3147/// <inheritdoc cref="Vector128.Sin(Vector128{double})" /> 3161/// <inheritdoc cref="Vector128.Sin(Vector128{float})" /> 3191/// <inheritdoc cref="Vector128.SinCos(Vector128{double})" /> 3205/// <inheritdoc cref="Vector128.SinCos(Vector128{float})" /> 3308/// <inheritdoc cref="Vector128.Subtract{T}(Vector128{T}, Vector128{T})" /> 3312/// <inheritdoc cref="Vector128.SubtractSaturate{T}(Vector128{T}, Vector128{T})" /> 3386/// <inheritdoc cref="Vector128.Truncate(Vector128{double})" /> 3390/// <inheritdoc cref="Vector128.Truncate(Vector128{float})" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (123)
160get => Vector128.CreateScalar(1.0f).AsVector2(); 169get => Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f).AsVector2(); 331public static Vector2 Abs(Vector2 value) => Vector128.Abs(value.AsVector128Unsafe()).AsVector2(); 344public static bool All(Vector2 vector, float value) => Vector128.All(vector, value); 349public static bool AllWhereAllBitsSet(Vector2 vector) => Vector128.AllWhereAllBitsSet(vector); 354public static Vector2 AndNot(Vector2 left, Vector2 right) => Vector128.AndNot(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 359public static bool Any(Vector2 vector, float value) => Vector128.Any(vector, value); 364public static bool AnyWhereAllBitsSet(Vector2 vector) => Vector128.AnyWhereAllBitsSet(vector); 379public static Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max) => Vector128.Clamp(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector2(); 384public static Vector2 ClampNative(Vector2 value1, Vector2 min, Vector2 max) => Vector128.ClampNative(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector2(); 389public static Vector2 ConditionalSelect(Vector2 condition, Vector2 left, Vector2 right) => Vector128.ConditionalSelect(condition.AsVector128Unsafe(), left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 394public static Vector2 CopySign(Vector2 value, Vector2 sign) => Vector128.CopySign(value.AsVector128Unsafe(), sign.AsVector128Unsafe()).AsVector2(); 398public static Vector2 Cos(Vector2 vector) => Vector128.Cos(vector.AsVector128()).AsVector2(); 403public static int Count(Vector2 vector, float value) => Vector128.Count(vector, value); 408public static int CountWhereAllBitsSet(Vector2 vector) => Vector128.CountWhereAllBitsSet(vector); 415public static Vector2 Create(float value) => Vector128.Create(value).AsVector2(); 423public static Vector2 Create(float x, float y) => Vector128.Create(x, y, 0.0f, 0.0f).AsVector2(); 444public static Vector2 CreateScalar(float x) => Vector128.CreateScalar(x).AsVector2(); 451public static Vector2 CreateScalarUnsafe(float x) => Vector128.CreateScalarUnsafe(x).AsVector2(); 469Vector128<float> mul = value1.AsVector128Unsafe() * Vector128.Shuffle(value2.AsVector128Unsafe(), Vector128.Create(1, 0, 2, 3)); 470return (mul - Vector128.Shuffle(mul, Vector128.Create(1, 0, 2, 3))).ToScalar(); 476public static Vector2 DegreesToRadians(Vector2 degrees) => Vector128.DegreesToRadians(degrees.AsVector128Unsafe()).AsVector2(); 484public static float Distance(Vector2 value1, Vector2 value2) => Vector128.Distance(value1.AsVector128(), value2.AsVector128()); 492public static float DistanceSquared(Vector2 value1, Vector2 value2) => Vector128.DistanceSquared(value1.AsVector128(), value2.AsVector128()); 516public static float Dot(Vector2 value1, Vector2 value2) => Vector128.Dot(value1.AsVector128(), value2.AsVector128()); 520public static Vector2 Exp(Vector2 vector) => Vector128.Exp(vector.AsVector128()).AsVector2(); 525public static Vector2 Equals(Vector2 left, Vector2 right) => Vector128.Equals(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 530public static bool EqualsAll(Vector2 left, Vector2 right) => Vector128.EqualsAll(left.AsVector128(), right.AsVector128()); 535public static bool EqualsAny(Vector2 left, Vector2 right) => Vector128.EqualsAny(Vector128.Equals(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, 0, 0)); 537/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 540public static Vector2 FusedMultiplyAdd(Vector2 left, Vector2 right, Vector2 addend) => Vector128.FusedMultiplyAdd(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector2(); 545public static Vector2 GreaterThan(Vector2 left, Vector2 right) => Vector128.GreaterThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 550public static bool GreaterThanAll(Vector2 left, Vector2 right) => Vector128.EqualsAll(Vector128.GreaterThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, 0, 0)); 555public static bool GreaterThanAny(Vector2 left, Vector2 right) => Vector128.EqualsAny(Vector128.GreaterThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, 0, 0)); 560public static Vector2 GreaterThanOrEqual(Vector2 left, Vector2 right) => Vector128.GreaterThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 565public static bool GreaterThanOrEqualAll(Vector2 left, Vector2 right) => Vector128.EqualsAll(Vector128.GreaterThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128<int>.AllBitsSet); 570public static bool GreaterThanOrEqualAny(Vector2 left, Vector2 right) => Vector128.EqualsAny(Vector128.GreaterThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, 0, 0)); 575public static Vector2 Hypot(Vector2 x, Vector2 y) => Vector128.Hypot(x.AsVector128Unsafe(), y.AsVector128Unsafe()).AsVector2(); 580public static int IndexOf(Vector2 vector, float value) => Vector128.IndexOf(vector, value); 585public static int IndexOfWhereAllBitsSet(Vector2 vector) => Vector128.IndexOfWhereAllBitsSet(vector); 590public static Vector2 IsEvenInteger(Vector2 vector) => Vector128.IsEvenInteger(vector.AsVector128Unsafe()).AsVector2(); 595public static Vector2 IsFinite(Vector2 vector) => Vector128.IsFinite(vector.AsVector128Unsafe()).AsVector2(); 600public static Vector2 IsInfinity(Vector2 vector) => Vector128.IsInfinity(vector.AsVector128Unsafe()).AsVector2(); 605public static Vector2 IsInteger(Vector2 vector) => Vector128.IsInteger(vector.AsVector128Unsafe()).AsVector2(); 610public static Vector2 IsNaN(Vector2 vector) => Vector128.IsNaN(vector.AsVector128Unsafe()).AsVector2(); 615public static Vector2 IsNegative(Vector2 vector) => Vector128.IsNegative(vector.AsVector128Unsafe()).AsVector2(); 620public static Vector2 IsNegativeInfinity(Vector2 vector) => Vector128.IsNegativeInfinity(vector.AsVector128Unsafe()).AsVector2(); 625public static Vector2 IsNormal(Vector2 vector) => Vector128.IsNormal(vector.AsVector128Unsafe()).AsVector2(); 630public static Vector2 IsOddInteger(Vector2 vector) => Vector128.IsOddInteger(vector.AsVector128Unsafe()).AsVector2(); 635public static Vector2 IsPositive(Vector2 vector) => Vector128.IsPositive(vector.AsVector128Unsafe()).AsVector2(); 640public static Vector2 IsPositiveInfinity(Vector2 vector) => Vector128.IsPositiveInfinity(vector.AsVector128Unsafe()).AsVector2(); 645public static Vector2 IsSubnormal(Vector2 vector) => Vector128.IsSubnormal(vector.AsVector128Unsafe()).AsVector2(); 650public static Vector2 IsZero(Vector2 vector) => Vector128.IsZero(vector.AsVector128Unsafe()).AsVector2(); 655public static int LastIndexOf(Vector2 vector, float value) => Vector128.LastIndexOf(vector, value); 660public static int LastIndexOfWhereAllBitsSet(Vector2 vector) => Vector128.LastIndexOfWhereAllBitsSet(vector); 665public static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount) => Vector128.Lerp(value1.AsVector128Unsafe(), value2.AsVector128Unsafe(), Vector128.Create(amount)).AsVector2(); 670public static Vector2 Lerp(Vector2 value1, Vector2 value2, Vector2 amount) => Vector128.Lerp(value1.AsVector128Unsafe(), value2.AsVector128Unsafe(), amount.AsVector128Unsafe()).AsVector2(); 675public static Vector2 LessThan(Vector2 left, Vector2 right) => Vector128.LessThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 680public static bool LessThanAll(Vector2 left, Vector2 right) => Vector128.EqualsAll(Vector128.LessThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, 0, 0)); 685public static bool LessThanAny(Vector2 left, Vector2 right) => Vector128.EqualsAny(Vector128.LessThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, 0, 0)); 690public static Vector2 LessThanOrEqual(Vector2 left, Vector2 right) => Vector128.LessThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 695public static bool LessThanOrEqualAll(Vector2 left, Vector2 right) => Vector128.EqualsAll(Vector128.LessThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128<int>.AllBitsSet); 700public static bool LessThanOrEqualAny(Vector2 left, Vector2 right) => Vector128.EqualsAny(Vector128.LessThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, 0, 0)); 727/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T)" /> 740public static Vector2 Log(Vector2 vector) => Vector128.Log(Vector4.Create(vector, 1.0f, 1.0f).AsVector128()).AsVector2(); 744public static Vector2 Log2(Vector2 vector) => Vector128.Log2(Vector4.Create(vector, 1.0f, 1.0f).AsVector128()).AsVector2(); 749public static Vector2 Max(Vector2 value1, Vector2 value2) => Vector128.Max(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 754public static Vector2 MaxMagnitude(Vector2 value1, Vector2 value2) => Vector128.MaxMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 759public static Vector2 MaxMagnitudeNumber(Vector2 value1, Vector2 value2) => Vector128.MaxMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 764public static Vector2 MaxNative(Vector2 value1, Vector2 value2) => Vector128.MaxNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 769public static Vector2 MaxNumber(Vector2 value1, Vector2 value2) => Vector128.MaxNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 774public static Vector2 Min(Vector2 value1, Vector2 value2) => Vector128.Min(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 779public static Vector2 MinMagnitude(Vector2 value1, Vector2 value2) => Vector128.MinMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 784public static Vector2 MinMagnitudeNumber(Vector2 value1, Vector2 value2) => Vector128.MinMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 789public static Vector2 MinNative(Vector2 value1, Vector2 value2) => Vector128.MinNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 794public static Vector2 MinNumber(Vector2 value1, Vector2 value2) => Vector128.MinNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 820/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 823public static Vector2 MultiplyAddEstimate(Vector2 left, Vector2 right, Vector2 addend) => Vector128.MultiplyAddEstimate(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector2(); 835public static bool None(Vector2 vector, float value) => Vector128.None(vector, value); 840public static bool NoneWhereAllBitsSet(Vector2 vector) => Vector128.NoneWhereAllBitsSet(vector); 847public static Vector2 Normalize(Vector2 value) => Vector128.Normalize(value.AsVector128()).AsVector2(); 857public static Vector2 RadiansToDegrees(Vector2 radians) => Vector128.RadiansToDegrees(radians.AsVector128Unsafe()).AsVector2(); 872Vector128<float> tmp = Vector128.Create(Vector128.Dot(vVector, vNormal)); 873return Vector128.MultiplyAddEstimate(-(tmp + tmp), vNormal, vVector).AsVector2(); 879public static Vector2 Round(Vector2 vector) => Vector128.Round(vector.AsVector128Unsafe()).AsVector2(); 884public static Vector2 Round(Vector2 vector, MidpointRounding mode) => Vector128.Round(vector.AsVector128Unsafe(), mode).AsVector2(); 896return Vector128.Shuffle(vector.AsVector128(), Vector128.Create(xIndex, yIndex, 2, 3)).AsVector2(); 901public static Vector2 Sin(Vector2 vector) => Vector128.Sin(vector.AsVector128()).AsVector2(); 907(Vector128<float> sin, Vector128<float> cos) = Vector128.SinCos(vector.AsVector128()); 916public static Vector2 SquareRoot(Vector2 value) => Vector128.Sqrt(value.AsVector128Unsafe()).AsVector2(); 929public static float Sum(Vector2 value) => Vector128.Sum(value.AsVector128()); 942result = Vector128.MultiplyAddEstimate(matrix.Y.AsVector128Unsafe(), Vector128.Create(position.GetElement(1)), result); 960result = Vector128.MultiplyAddEstimate(matrix.Y, Vector128.Create(position.GetElement(1)), result); 982result = Vector128.MultiplyAddEstimate(matrix.Y.AsVector128(), Vector128.Create(normal.GetElement(1)), result); 997result = Vector128.MultiplyAddEstimate(matrix.Y, Vector128.Create(normal.GetElement(1)), result); 1004public static Vector2 Truncate(Vector2 vector) => Vector128.Truncate(vector.AsVector128Unsafe()).AsVector2(); 1107public readonly float Length() => Vector128.Length(this.AsVector128()); 1115public readonly float LengthSquared() => Vector128.LengthSquared(this.AsVector128());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (128)
174get => Vector128.CreateScalar(1.0f).AsVector3(); 183get => Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f).AsVector3(); 192get => Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f).AsVector3(); 354public static Vector3 Abs(Vector3 value) => Vector128.Abs(value.AsVector128Unsafe()).AsVector3(); 367public static bool All(Vector3 vector, float value) => Vector128.All(vector, value); 372public static bool AllWhereAllBitsSet(Vector3 vector) => Vector128.AllWhereAllBitsSet(vector); 377public static Vector3 AndNot(Vector3 left, Vector3 right) => Vector128.AndNot(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 382public static bool Any(Vector3 vector, float value) => Vector128.Any(vector, value); 387public static bool AnyWhereAllBitsSet(Vector3 vector) => Vector128.AnyWhereAllBitsSet(vector); 402public static Vector3 Clamp(Vector3 value1, Vector3 min, Vector3 max) => Vector128.Clamp(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector3(); 407public static Vector3 ClampNative(Vector3 value1, Vector3 min, Vector3 max) => Vector128.ClampNative(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector3(); 412public static Vector3 ConditionalSelect(Vector3 condition, Vector3 left, Vector3 right) => Vector128.ConditionalSelect(condition.AsVector128Unsafe(), left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 417public static Vector3 CopySign(Vector3 value, Vector3 sign) => Vector128.CopySign(value.AsVector128Unsafe(), sign.AsVector128Unsafe()).AsVector3(); 421public static Vector3 Cos(Vector3 vector) => Vector128.Cos(vector.AsVector128()).AsVector3(); 426public static int Count(Vector3 vector, float value) => Vector128.Count(vector, value); 431public static int CountWhereAllBitsSet(Vector3 vector) => Vector128.CountWhereAllBitsSet(vector); 438public static Vector3 Create(float value) => Vector128.Create(value).AsVector3(); 460public static Vector3 Create(float x, float y, float z) => Vector128.Create(x, y, z, 0).AsVector3(); 481public static Vector3 CreateScalar(float x) => Vector128.CreateScalar(x).AsVector3(); 488public static Vector3 CreateScalarUnsafe(float x) => Vector128.CreateScalarUnsafe(x).AsVector3(); 503Vector128<float> temp1 = Vector128.Shuffle(vector1, Vector128.Create(1, 2, 0, 3)) * Vector128.Shuffle(vector2, Vector128.Create(2, 0, 1, 3)); 504Vector128<float> temp2 = Vector128.Shuffle(vector1, Vector128.Create(2, 0, 1, 3)) * Vector128.Shuffle(vector2, Vector128.Create(1, 2, 0, 3)); 512public static Vector3 DegreesToRadians(Vector3 degrees) => Vector128.DegreesToRadians(degrees.AsVector128Unsafe()).AsVector3(); 520public static float Distance(Vector3 value1, Vector3 value2) => Vector128.Distance(value1.AsVector128(), value2.AsVector128()); 528public static float DistanceSquared(Vector3 value1, Vector3 value2) => Vector128.DistanceSquared(value1.AsVector128(), value2.AsVector128()); 552public static float Dot(Vector3 vector1, Vector3 vector2) => Vector128.Dot(vector1.AsVector128(), vector2.AsVector128()); 556public static Vector3 Exp(Vector3 vector) => Vector128.Exp(vector.AsVector128()).AsVector3(); 561public static Vector3 Equals(Vector3 left, Vector3 right) => Vector128.Equals(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 566public static bool EqualsAll(Vector3 left, Vector3 right) => Vector128.EqualsAll(left.AsVector128(), right.AsVector128()); 571public static bool EqualsAny(Vector3 left, Vector3 right) => Vector128.EqualsAny(Vector128.Equals(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, -1, 0)); 573/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 576public static Vector3 FusedMultiplyAdd(Vector3 left, Vector3 right, Vector3 addend) => Vector128.FusedMultiplyAdd(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector3(); 581public static Vector3 GreaterThan(Vector3 left, Vector3 right) => Vector128.GreaterThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 586public static bool GreaterThanAll(Vector3 left, Vector3 right) => Vector128.EqualsAll(Vector128.GreaterThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, -1, 0)); 591public static bool GreaterThanAny(Vector3 left, Vector3 right) => Vector128.EqualsAny(Vector128.GreaterThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, -1, 0)); 596public static Vector3 GreaterThanOrEqual(Vector3 left, Vector3 right) => Vector128.GreaterThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 601public static bool GreaterThanOrEqualAll(Vector3 left, Vector3 right) => Vector128.EqualsAll(Vector128.GreaterThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128<int>.AllBitsSet); 606public static bool GreaterThanOrEqualAny(Vector3 left, Vector3 right) => Vector128.EqualsAny(Vector128.GreaterThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, -1, 0)); 611public static Vector3 Hypot(Vector3 x, Vector3 y) => Vector128.Hypot(x.AsVector128Unsafe(), y.AsVector128Unsafe()).AsVector3(); 616public static int IndexOf(Vector3 vector, float value) => Vector128.IndexOf(vector, value); 621public static int IndexOfWhereAllBitsSet(Vector3 vector) => Vector128.IndexOfWhereAllBitsSet(vector); 626public static Vector3 IsEvenInteger(Vector3 vector) => Vector128.IsEvenInteger(vector.AsVector128Unsafe()).AsVector3(); 631public static Vector3 IsFinite(Vector3 vector) => Vector128.IsFinite(vector.AsVector128Unsafe()).AsVector3(); 636public static Vector3 IsInfinity(Vector3 vector) => Vector128.IsInfinity(vector.AsVector128Unsafe()).AsVector3(); 641public static Vector3 IsInteger(Vector3 vector) => Vector128.IsInteger(vector.AsVector128Unsafe()).AsVector3(); 646public static Vector3 IsNaN(Vector3 vector) => Vector128.IsNaN(vector.AsVector128Unsafe()).AsVector3(); 651public static Vector3 IsNegative(Vector3 vector) => Vector128.IsNegative(vector.AsVector128Unsafe()).AsVector3(); 656public static Vector3 IsNegativeInfinity(Vector3 vector) => Vector128.IsNegativeInfinity(vector.AsVector128Unsafe()).AsVector3(); 661public static Vector3 IsNormal(Vector3 vector) => Vector128.IsNormal(vector.AsVector128Unsafe()).AsVector3(); 666public static Vector3 IsOddInteger(Vector3 vector) => Vector128.IsOddInteger(vector.AsVector128Unsafe()).AsVector3(); 671public static Vector3 IsPositive(Vector3 vector) => Vector128.IsPositive(vector.AsVector128Unsafe()).AsVector3(); 676public static Vector3 IsPositiveInfinity(Vector3 vector) => Vector128.IsPositiveInfinity(vector.AsVector128Unsafe()).AsVector3(); 681public static Vector3 IsSubnormal(Vector3 vector) => Vector128.IsSubnormal(vector.AsVector128Unsafe()).AsVector3(); 686public static Vector3 IsZero(Vector3 vector) => Vector128.IsZero(vector.AsVector128Unsafe()).AsVector3(); 691public static int LastIndexOf(Vector3 vector, float value) => Vector128.LastIndexOf(vector, value); 696public static int LastIndexOfWhereAllBitsSet(Vector3 vector) => Vector128.LastIndexOfWhereAllBitsSet(vector); 702public static Vector3 Lerp(Vector3 value1, Vector3 value2, float amount) => Vector128.Lerp(value1.AsVector128Unsafe(), value2.AsVector128Unsafe(), Vector128.Create(amount)).AsVector3(); 707public static Vector3 Lerp(Vector3 value1, Vector3 value2, Vector3 amount) => Vector128.Lerp(value1.AsVector128Unsafe(), value2.AsVector128Unsafe(), amount.AsVector128Unsafe()).AsVector3(); 712public static Vector3 LessThan(Vector3 left, Vector3 right) => Vector128.LessThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 717public static bool LessThanAll(Vector3 left, Vector3 right) => Vector128.EqualsAll(Vector128.LessThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, -1, 0)); 722public static bool LessThanAny(Vector3 left, Vector3 right) => Vector128.EqualsAny(Vector128.LessThan(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, -1, 0)); 727public static Vector3 LessThanOrEqual(Vector3 left, Vector3 right) => Vector128.LessThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 732public static bool LessThanOrEqualAll(Vector3 left, Vector3 right) => Vector128.EqualsAll(Vector128.LessThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128<int>.AllBitsSet); 737public static bool LessThanOrEqualAny(Vector3 left, Vector3 right) => Vector128.EqualsAny(Vector128.LessThanOrEqual(left.AsVector128(), right.AsVector128()).AsInt32(), Vector128.Create(-1, -1, -1, 0)); 764/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T)" /> 777public static Vector3 Log(Vector3 vector) => Vector128.Log(Vector4.Create(vector, 1.0f).AsVector128()).AsVector3(); 781public static Vector3 Log2(Vector3 vector) => Vector128.Log2(Vector4.Create(vector, 1.0f).AsVector128()).AsVector3(); 786public static Vector3 Max(Vector3 value1, Vector3 value2) => Vector128.Max(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 791public static Vector3 MaxMagnitude(Vector3 value1, Vector3 value2) => Vector128.MaxMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 796public static Vector3 MaxMagnitudeNumber(Vector3 value1, Vector3 value2) => Vector128.MaxMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 801public static Vector3 MaxNative(Vector3 value1, Vector3 value2) => Vector128.MaxNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 806public static Vector3 MaxNumber(Vector3 value1, Vector3 value2) => Vector128.MaxNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 811public static Vector3 Min(Vector3 value1, Vector3 value2) => Vector128.Min(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 816public static Vector3 MinMagnitude(Vector3 value1, Vector3 value2) => Vector128.MinMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 821public static Vector3 MinMagnitudeNumber(Vector3 value1, Vector3 value2) => Vector128.MinMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 826public static Vector3 MinNative(Vector3 value1, Vector3 value2) => Vector128.MinNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 831public static Vector3 MinNumber(Vector3 value1, Vector3 value2) => Vector128.MinNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 857/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 860public static Vector3 MultiplyAddEstimate(Vector3 left, Vector3 right, Vector3 addend) => Vector128.MultiplyAddEstimate(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector3(); 872public static bool None(Vector3 vector, float value) => Vector128.None(vector, value); 877public static bool NoneWhereAllBitsSet(Vector3 vector) => Vector128.NoneWhereAllBitsSet(vector); 884public static Vector3 Normalize(Vector3 value) => Vector128.Normalize(value.AsVector128()).AsVector3(); 894public static Vector3 RadiansToDegrees(Vector3 radians) => Vector128.RadiansToDegrees(radians.AsVector128Unsafe()).AsVector3(); 909Vector128<float> tmp = Vector128.Create(Vector128.Dot(vVector, vNormal)); 910return Vector128.MultiplyAddEstimate(-(tmp + tmp), vNormal, vVector).AsVector3(); 916public static Vector3 Round(Vector3 vector) => Vector128.Round(vector.AsVector128Unsafe()).AsVector3(); 921public static Vector3 Round(Vector3 vector, MidpointRounding mode) => Vector128.Round(vector.AsVector128Unsafe(), mode).AsVector3(); 934return Vector128.Shuffle(vector.AsVector128(), Vector128.Create(xIndex, yIndex, zIndex, 3)).AsVector3(); 939public static Vector3 Sin(Vector3 vector) => Vector128.Sin(vector.AsVector128()).AsVector3(); 945(Vector128<float> sin, Vector128<float> cos) = Vector128.SinCos(vector.AsVector128()); 954public static Vector3 SquareRoot(Vector3 value) => Vector128.Sqrt(value.AsVector128Unsafe()).AsVector3(); 967public static float Sum(Vector3 value) => Vector128.Sum(value.AsVector128()); 983result = Vector128.MultiplyAddEstimate(matrix.Y, Vector128.Create(position.GetElement(1)), result); 984result = Vector128.MultiplyAddEstimate(matrix.Z, Vector128.Create(position.GetElement(2)), result); 1006result = Vector128.MultiplyAddEstimate(matrix.Y, Vector128.Create(normal.GetElement(1)), result); 1007result = Vector128.MultiplyAddEstimate(matrix.Z, Vector128.Create(normal.GetElement(2)), result); 1014public static Vector3 Truncate(Vector3 vector) => Vector128.Truncate(vector.AsVector128Unsafe()).AsVector3(); 1117public readonly float Length() => Vector128.Length(this.AsVector128()); 1125public readonly float LengthSquared() => Vector128.LengthSquared(this.AsVector128());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (191)
199get => Vector128.CreateScalar(1.0f).AsVector4(); 208get => Vector128.Create(0.0f, 1.0f, 0.0f, 0.0f).AsVector4(); 217get => Vector128.Create(0.0f, 0.0f, 1.0f, 0.0f).AsVector4(); 226get => Vector128.Create(0.0f, 0.0f, 0.0f, 1.0f).AsVector4(); 389public static Vector4 Abs(Vector4 value) => Vector128.Abs(value.AsVector128()).AsVector4(); 399/// <inheritdoc cref="Vector128.All{T}(Vector128{T}, T)" /> 402public static bool All(Vector4 vector, float value) => Vector128.All(vector.AsVector128(), value); 404/// <inheritdoc cref="Vector128.AllWhereAllBitsSet{T}(Vector128{T})" /> 407public static bool AllWhereAllBitsSet(Vector4 vector) => Vector128.AllWhereAllBitsSet(vector.AsVector128()); 409/// <inheritdoc cref="Vector128.AndNot{T}(Vector128{T}, Vector128{T})" /> 412public static Vector4 AndNot(Vector4 left, Vector4 right) => Vector128.AndNot(left.AsVector128(), right.AsVector128()).AsVector4(); 414/// <inheritdoc cref="Vector128.Any{T}(Vector128{T}, T)" /> 417public static bool Any(Vector4 vector, float value) => Vector128.Any(vector.AsVector128(), value); 419/// <inheritdoc cref="Vector128.AnyWhereAllBitsSet{T}(Vector128{T})" /> 422public static bool AnyWhereAllBitsSet(Vector4 vector) => Vector128.AnyWhereAllBitsSet(vector.AsVector128()); 424/// <inheritdoc cref="Vector128.BitwiseAnd{T}(Vector128{T}, Vector128{T})" /> 429/// <inheritdoc cref="Vector128.BitwiseOr{T}(Vector128{T}, Vector128{T})" /> 434/// <inheritdoc cref="Vector128.Clamp{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 437public static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max) => Vector128.Clamp(value1.AsVector128(), min.AsVector128(), max.AsVector128()).AsVector4(); 439/// <inheritdoc cref="Vector128.ClampNative{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 442public static Vector4 ClampNative(Vector4 value1, Vector4 min, Vector4 max) => Vector128.ClampNative(value1.AsVector128(), min.AsVector128(), max.AsVector128()).AsVector4(); 444/// <inheritdoc cref="Vector128.ConditionalSelect{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 447public static Vector4 ConditionalSelect(Vector4 condition, Vector4 left, Vector4 right) => Vector128.ConditionalSelect(condition.AsVector128(), left.AsVector128(), right.AsVector128()).AsVector4(); 449/// <inheritdoc cref="Vector128.CopySign{T}(Vector128{T}, Vector128{T})" /> 452public static Vector4 CopySign(Vector4 value, Vector4 sign) => Vector128.CopySign(value.AsVector128(), sign.AsVector128()).AsVector4(); 454/// <inheritdoc cref="Vector128.Cos(Vector128{float})" /> 456public static Vector4 Cos(Vector4 vector) => Vector128.Cos(vector.AsVector128()).AsVector4(); 458/// <inheritdoc cref="Vector128.Count{T}(Vector128{T}, T)" /> 461public static int Count(Vector4 vector, float value) => Vector128.Count(vector.AsVector128(), value); 463/// <inheritdoc cref="Vector128.CountWhereAllBitsSet{T}(Vector128{T})" /> 466public static int CountWhereAllBitsSet(Vector4 vector) => Vector128.CountWhereAllBitsSet(vector.AsVector128()); 473public static Vector4 Create(float value) => Vector128.Create(value).AsVector4(); 511public static Vector4 Create(float x, float y, float z, float w) => Vector128.Create(x, y, z, w).AsVector4(); 532public static Vector4 CreateScalar(float x) => Vector128.CreateScalar(x).AsVector4(); 539public static Vector4 CreateScalarUnsafe(float x) => Vector128.CreateScalarUnsafe(x).AsVector4(); 571Vector128<float> m2 = Vector128.Shuffle(v1, Vector128.Create(2, 0, 1, 3)) * Vector128.Shuffle(v2, Vector128.Create(1, 2, 0, 3)); 573return Vector128.MultiplyAddEstimate( 574Vector128.Shuffle(v1, Vector128.Create(1, 2, 0, 3)), 575Vector128.Shuffle(v2, Vector128.Create(2, 0, 1, 3)), 580/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{float})" /> 583public static Vector4 DegreesToRadians(Vector4 degrees) => Vector128.DegreesToRadians(degrees.AsVector128()).AsVector4(); 591public static float Distance(Vector4 value1, Vector4 value2) => Vector128.Distance(value1.AsVector128(), value2.AsVector128()); 599public static float DistanceSquared(Vector4 value1, Vector4 value2) => Vector128.DistanceSquared(value1.AsVector128(), value2.AsVector128()); 623public static float Dot(Vector4 vector1, Vector4 vector2) => Vector128.Dot(vector1.AsVector128(), vector2.AsVector128()); 625/// <inheritdoc cref="Vector128.Exp(Vector128{float})" /> 627public static Vector4 Exp(Vector4 vector) => Vector128.Exp(vector.AsVector128()).AsVector4(); 629/// <inheritdoc cref="Vector128.Equals{T}(Vector128{T}, Vector128{T})" /> 632public static Vector4 Equals(Vector4 left, Vector4 right) => Vector128.Equals(left.AsVector128(), right.AsVector128()).AsVector4(); 634/// <inheritdoc cref="Vector128.EqualsAll{T}(Vector128{T}, Vector128{T})" /> 637public static bool EqualsAll(Vector4 left, Vector4 right) => Vector128.EqualsAll(left.AsVector128(), right.AsVector128()); 639/// <inheritdoc cref="Vector128.EqualsAny{T}(Vector128{T}, Vector128{T})" /> 642public static bool EqualsAny(Vector4 left, Vector4 right) => Vector128.EqualsAny(left.AsVector128(), right.AsVector128()); 644/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 647public static Vector4 FusedMultiplyAdd(Vector4 left, Vector4 right, Vector4 addend) => Vector128.FusedMultiplyAdd(left.AsVector128(), right.AsVector128(), addend.AsVector128()).AsVector4(); 649/// <inheritdoc cref="Vector128.GreaterThan{T}(Vector128{T}, Vector128{T})" /> 652public static Vector4 GreaterThan(Vector4 left, Vector4 right) => Vector128.GreaterThan(left.AsVector128(), right.AsVector128()).AsVector4(); 654/// <inheritdoc cref="Vector128.GreaterThanAll{T}(Vector128{T}, Vector128{T})" /> 657public static bool GreaterThanAll(Vector4 left, Vector4 right) => Vector128.GreaterThanAll(left.AsVector128(), right.AsVector128()); 659/// <inheritdoc cref="Vector128.GreaterThanAny{T}(Vector128{T}, Vector128{T})" /> 662public static bool GreaterThanAny(Vector4 left, Vector4 right) => Vector128.GreaterThanAny(left.AsVector128(), right.AsVector128()); 664/// <inheritdoc cref="Vector128.GreaterThanOrEqual{T}(Vector128{T}, Vector128{T})" /> 667public static Vector4 GreaterThanOrEqual(Vector4 left, Vector4 right) => Vector128.GreaterThanOrEqual(left.AsVector128(), right.AsVector128()).AsVector4(); 669/// <inheritdoc cref="Vector128.GreaterThanOrEqualAll{T}(Vector128{T}, Vector128{T})" /> 672public static bool GreaterThanOrEqualAll(Vector4 left, Vector4 right) => Vector128.GreaterThanOrEqualAll(left.AsVector128(), right.AsVector128()); 674/// <inheritdoc cref="Vector128.GreaterThanOrEqualAny{T}(Vector128{T}, Vector128{T})" /> 677public static bool GreaterThanOrEqualAny(Vector4 left, Vector4 right) => Vector128.GreaterThanOrEqualAny(left.AsVector128(), right.AsVector128()); 679/// <inheritdoc cref="Vector128.Hypot(Vector128{float}, Vector128{float})" /> 682public static Vector4 Hypot(Vector4 x, Vector4 y) => Vector128.Hypot(x.AsVector128(), y.AsVector128()).AsVector4(); 684/// <inheritdoc cref="Vector128.IndexOf{T}(Vector128{T}, T)" /> 687public static int IndexOf(Vector4 vector, float value) => Vector128.IndexOf(vector.AsVector128(), value); 689/// <inheritdoc cref="Vector128.IndexOfWhereAllBitsSet{T}(Vector128{T})" /> 692public static int IndexOfWhereAllBitsSet(Vector4 vector) => Vector128.IndexOfWhereAllBitsSet(vector.AsVector128()); 694/// <inheritdoc cref="Vector128.IsEvenInteger{T}(Vector128{T})" /> 697public static Vector4 IsEvenInteger(Vector4 vector) => Vector128.IsEvenInteger(vector.AsVector128()).AsVector4(); 699/// <inheritdoc cref="Vector128.IsFinite{T}(Vector128{T})" /> 702public static Vector4 IsFinite(Vector4 vector) => Vector128.IsFinite(vector.AsVector128()).AsVector4(); 704/// <inheritdoc cref="Vector128.IsInfinity{T}(Vector128{T})" /> 707public static Vector4 IsInfinity(Vector4 vector) => Vector128.IsInfinity(vector.AsVector128()).AsVector4(); 709/// <inheritdoc cref="Vector128.IsInteger{T}(Vector128{T})" /> 712public static Vector4 IsInteger(Vector4 vector) => Vector128.IsInteger(vector.AsVector128()).AsVector4(); 714/// <inheritdoc cref="Vector128.IsNaN{T}(Vector128{T})" /> 717public static Vector4 IsNaN(Vector4 vector) => Vector128.IsNaN(vector.AsVector128()).AsVector4(); 719/// <inheritdoc cref="Vector128.IsNegative{T}(Vector128{T})" /> 722public static Vector4 IsNegative(Vector4 vector) => Vector128.IsNegative(vector.AsVector128()).AsVector4(); 724/// <inheritdoc cref="Vector128.IsNegativeInfinity{T}(Vector128{T})" /> 727public static Vector4 IsNegativeInfinity(Vector4 vector) => Vector128.IsNegativeInfinity(vector.AsVector128()).AsVector4(); 729/// <inheritdoc cref="Vector128.IsNormal{T}(Vector128{T})" /> 732public static Vector4 IsNormal(Vector4 vector) => Vector128.IsNormal(vector.AsVector128()).AsVector4(); 734/// <inheritdoc cref="Vector128.IsOddInteger{T}(Vector128{T})" /> 737public static Vector4 IsOddInteger(Vector4 vector) => Vector128.IsOddInteger(vector.AsVector128()).AsVector4(); 739/// <inheritdoc cref="Vector128.IsPositive{T}(Vector128{T})" /> 742public static Vector4 IsPositive(Vector4 vector) => Vector128.IsPositive(vector.AsVector128()).AsVector4(); 744/// <inheritdoc cref="Vector128.IsPositiveInfinity{T}(Vector128{T})" /> 747public static Vector4 IsPositiveInfinity(Vector4 vector) => Vector128.IsPositiveInfinity(vector.AsVector128()).AsVector4(); 749/// <inheritdoc cref="Vector128.IsSubnormal{T}(Vector128{T})" /> 752public static Vector4 IsSubnormal(Vector4 vector) => Vector128.IsSubnormal(vector.AsVector128()).AsVector4(); 754/// <inheritdoc cref="Vector128.IsZero{T}(Vector128{T})" /> 757public static Vector4 IsZero(Vector4 vector) => Vector128.IsZero(vector.AsVector128()).AsVector4(); 759/// <inheritdoc cref="Vector128.LastIndexOf{T}(Vector128{T}, T)" /> 762public static int LastIndexOf(Vector4 vector, float value) => Vector128.LastIndexOf(vector.AsVector128(), value); 764/// <inheritdoc cref="Vector128.LastIndexOfWhereAllBitsSet{T}(Vector128{T})" /> 767public static int LastIndexOfWhereAllBitsSet(Vector4 vector) => Vector128.LastIndexOfWhereAllBitsSet(vector.AsVector128()); 775public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount) => Vector128.Lerp(value1.AsVector128(), value2.AsVector128(), Vector128.Create(amount)).AsVector4(); 777/// <inheritdoc cref="Vector128.Lerp(Vector128{float}, Vector128{float}, Vector128{float})" /> 780public static Vector4 Lerp(Vector4 value1, Vector4 value2, Vector4 amount) => Vector128.Lerp(value1.AsVector128(), value2.AsVector128(), amount.AsVector128()).AsVector4(); 782/// <inheritdoc cref="Vector128.LessThan{T}(Vector128{T}, Vector128{T})" /> 785public static Vector4 LessThan(Vector4 left, Vector4 right) => Vector128.LessThan(left.AsVector128(), right.AsVector128()).AsVector4(); 787/// <inheritdoc cref="Vector128.LessThanAll{T}(Vector128{T}, Vector128{T})" /> 790public static bool LessThanAll(Vector4 left, Vector4 right) => Vector128.LessThanAll(left.AsVector128(), right.AsVector128()); 792/// <inheritdoc cref="Vector128.LessThanAny{T}(Vector128{T}, Vector128{T})" /> 795public static bool LessThanAny(Vector4 left, Vector4 right) => Vector128.LessThanAny(left.AsVector128(), right.AsVector128()); 797/// <inheritdoc cref="Vector128.LessThanOrEqual{T}(Vector128{T}, Vector128{T})" /> 800public static Vector4 LessThanOrEqual(Vector4 left, Vector4 right) => Vector128.LessThanOrEqual(left.AsVector128(), right.AsVector128()).AsVector4(); 802/// <inheritdoc cref="Vector128.LessThanOrEqualAll{T}(Vector128{T}, Vector128{T})" /> 805public static bool LessThanOrEqualAll(Vector4 left, Vector4 right) => Vector128.LessThanOrEqualAll(left.AsVector128(), right.AsVector128()); 807/// <inheritdoc cref="Vector128.LessThanOrEqualAny{T}(Vector128{T}, Vector128{T})" /> 810public static bool LessThanOrEqualAny(Vector4 left, Vector4 right) => Vector128.LessThanOrEqualAny(left.AsVector128(), right.AsVector128()); 812/// <inheritdoc cref="Vector128.Load{T}(T*)" /> 816public static unsafe Vector4 Load(float* source) => Vector128.Load(source).AsVector4(); 818/// <inheritdoc cref="Vector128.LoadAligned{T}(T*)" /> 822public static unsafe Vector4 LoadAligned(float* source) => Vector128.LoadAligned(source).AsVector4(); 824/// <inheritdoc cref="Vector128.LoadAlignedNonTemporal{T}(T*)" /> 828public static unsafe Vector4 LoadAlignedNonTemporal(float* source) => Vector128.LoadAlignedNonTemporal(source).AsVector4(); 830/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T)" /> 833public static Vector4 LoadUnsafe(ref readonly float source) => Vector128.LoadUnsafe(in source).AsVector4(); 835/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T, nuint)" /> 839public static Vector4 LoadUnsafe(ref readonly float source, nuint elementOffset) => Vector128.LoadUnsafe(in source, elementOffset).AsVector4(); 841/// <inheritdoc cref="Vector128.Log(Vector128{float})" /> 843public static Vector4 Log(Vector4 vector) => Vector128.Log(vector.AsVector128()).AsVector4(); 845/// <inheritdoc cref="Vector128.Log2(Vector128{float})" /> 847public static Vector4 Log2(Vector4 vector) => Vector128.Log2(vector.AsVector128()).AsVector4(); 849/// <inheritdoc cref="Vector128.Max{T}(Vector128{T}, Vector128{T})" /> 852public static Vector4 Max(Vector4 value1, Vector4 value2) => Vector128.Max(value1.AsVector128(), value2.AsVector128()).AsVector4(); 854/// <inheritdoc cref="Vector128.MaxMagnitude{T}(Vector128{T}, Vector128{T})" /> 857public static Vector4 MaxMagnitude(Vector4 value1, Vector4 value2) => Vector128.MaxMagnitude(value1.AsVector128(), value2.AsVector128()).AsVector4(); 859/// <inheritdoc cref="Vector128.MaxMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 862public static Vector4 MaxMagnitudeNumber(Vector4 value1, Vector4 value2) => Vector128.MaxMagnitudeNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 864/// <inheritdoc cref="Vector128.MaxNative{T}(Vector128{T}, Vector128{T})" /> 867public static Vector4 MaxNative(Vector4 value1, Vector4 value2) => Vector128.MaxNative(value1.AsVector128(), value2.AsVector128()).AsVector4(); 869/// <inheritdoc cref="Vector128.MaxNumber{T}(Vector128{T}, Vector128{T})" /> 872public static Vector4 MaxNumber(Vector4 value1, Vector4 value2) => Vector128.MaxNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 874/// <inheritdoc cref="Vector128.Min{T}(Vector128{T}, Vector128{T})" /> 877public static Vector4 Min(Vector4 value1, Vector4 value2) => Vector128.Min(value1.AsVector128(), value2.AsVector128()).AsVector4(); 879/// <inheritdoc cref="Vector128.MinMagnitude{T}(Vector128{T}, Vector128{T})" /> 882public static Vector4 MinMagnitude(Vector4 value1, Vector4 value2) => Vector128.MinMagnitude(value1.AsVector128(), value2.AsVector128()).AsVector4(); 884/// <inheritdoc cref="Vector128.MinMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 887public static Vector4 MinMagnitudeNumber(Vector4 value1, Vector4 value2) => Vector128.MinMagnitudeNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 889/// <inheritdoc cref="Vector128.MinNative{T}(Vector128{T}, Vector128{T})" /> 892public static Vector4 MinNative(Vector4 value1, Vector4 value2) => Vector128.MinNative(value1.AsVector128(), value2.AsVector128()).AsVector4(); 894/// <inheritdoc cref="Vector128.MinNumber{T}(Vector128{T}, Vector128{T})" /> 897public static Vector4 MinNumber(Vector4 value1, Vector4 value2) => Vector128.MinNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 923/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 926public static Vector4 MultiplyAddEstimate(Vector4 left, Vector4 right, Vector4 addend) => Vector128.MultiplyAddEstimate(left.AsVector128(), right.AsVector128(), addend.AsVector128()).AsVector4(); 935/// <inheritdoc cref="Vector128.None{T}(Vector128{T}, T)" /> 938public static bool None(Vector4 vector, float value) => Vector128.None(vector.AsVector128(), value); 940/// <inheritdoc cref="Vector128.NoneWhereAllBitsSet{T}(Vector128{T})" /> 943public static bool NoneWhereAllBitsSet(Vector4 vector) => Vector128.NoneWhereAllBitsSet(vector.AsVector128()); 950public static Vector4 Normalize(Vector4 vector) => Vector128.Normalize(vector.AsVector128()).AsVector4(); 952/// <inheritdoc cref="Vector128.OnesComplement{T}(Vector128{T})" /> 957/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{float})" /> 960public static Vector4 RadiansToDegrees(Vector4 radians) => Vector128.RadiansToDegrees(radians.AsVector128()).AsVector4(); 962/// <inheritdoc cref="Vector128.Round(Vector128{float})" /> 965public static Vector4 Round(Vector4 vector) => Vector128.Round(vector.AsVector128()).AsVector4(); 967/// <inheritdoc cref="Vector128.Round(Vector128{float}, MidpointRounding)" /> 970public static Vector4 Round(Vector4 vector, MidpointRounding mode) => Vector128.Round(vector.AsVector128(), mode).AsVector4(); 982return Vector128.Shuffle(vector.AsVector128(), Vector128.Create(xIndex, yIndex, zIndex, wIndex)).AsVector4(); 985/// <inheritdoc cref="Vector128.Sin(Vector128{float})" /> 987public static Vector4 Sin(Vector4 vector) => Vector128.Sin(vector.AsVector128()).AsVector4(); 989/// <inheritdoc cref="Vector128.SinCos(Vector128{float})" /> 993(Vector128<float> sin, Vector128<float> cos) = Vector128.SinCos(vector.AsVector128()); 1002public static Vector4 SquareRoot(Vector4 value) => Vector128.Sqrt(value.AsVector128()).AsVector4(); 1012/// <inheritdoc cref="Vector128.Sum{T}(Vector128{T})" /> 1015public static float Sum(Vector4 value) => Vector128.Sum(value.AsVector128()); 1059result = Vector128.MultiplyAddEstimate(matrix.Y, Vector128.Create(vector.GetElement(1)), result); 1060result = Vector128.MultiplyAddEstimate(matrix.Z, Vector128.Create(vector.GetElement(2)), result); 1061result = Vector128.MultiplyAddEstimate(matrix.W, Vector128.Create(vector.GetElement(3)), result); 1083/// <inheritdoc cref="Vector128.Truncate(Vector128{float})" /> 1086public static Vector4 Truncate(Vector4 vector) => Vector128.Truncate(vector.AsVector128()).AsVector4(); 1088/// <inheritdoc cref="Vector128.Xor{T}(Vector128{T}, Vector128{T})" /> 1187public readonly float Length() => Vector128.Length(this.AsVector128()); 1195public readonly float LengthSquared() => Vector128.LengthSquared(this.AsVector128());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.Extensions.cs (4)
33/// <inheritdoc cref="Vector128.ExtractMostSignificantBits{T}(Vector128{T})" /> 38/// <inheritdoc cref="Vector128.GetElement{T}(Vector128{T}, int)" /> 78/// <inheritdoc cref="Vector128.ToScalar{T}(Vector128{T})" /> 82/// <inheritdoc cref="Vector128.WithElement{T}(Vector128{T}, int, T)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128_1.cs (97)
31[StructLayout(LayoutKind.Sequential, Size = Vector128.Size)] 42get => Vector128.Create(Scalar<T>.AllBitsSet); 53return Vector128.Size / sizeof(T); 105get => Vector128.Create(Scalar<T>.One); 138return Vector128.Create( 153return Vector128.Create( 168return Vector128.Create( 183return Vector128.Create( 197return Vector128.Create( 225return Vector128.Create( 247return Vector128.Create( 262return Vector128.Create( 277return Vector128.Create( 300return Vector128.Create( 314return Vector128.Create( 329return Vector128.Create( 376return Vector128.Create( 394Vector128<T> result = Vector128.Equals(lhs, rhs) | ~(Vector128.Equals(lhs, lhs) | Vector128.Equals(rhs, rhs)); 407if (Vector128.IsHardwareAccelerated) 472static int ISimdVector<Vector128<T>, T>.Alignment => Vector128.Alignment; 481get => Vector128.IsHardwareAccelerated; 486static Vector128<T> ISimdVector<Vector128<T>, T>.Abs(Vector128<T> vector) => Vector128.Abs(vector); 494static bool ISimdVector<Vector128<T>, T>.All(Vector128<T> vector, T value) => Vector128.All(vector, value); 498static bool ISimdVector<Vector128<T>, T>.AllWhereAllBitsSet(Vector128<T> vector) => Vector128.AllWhereAllBitsSet(vector); 502static Vector128<T> ISimdVector<Vector128<T>, T>.AndNot(Vector128<T> left, Vector128<T> right) => Vector128.AndNot(left, right); 506static bool ISimdVector<Vector128<T>, T>.Any(Vector128<T> vector, T value) => Vector128.Any(vector, value); 510static bool ISimdVector<Vector128<T>, T>.AnyWhereAllBitsSet(Vector128<T> vector) => Vector128.AnyWhereAllBitsSet(vector); 522static Vector128<T> ISimdVector<Vector128<T>, T>.Ceiling(Vector128<T> vector) => Vector128.Ceiling(vector); 526static Vector128<T> ISimdVector<Vector128<T>, T>.Clamp(Vector128<T> value, Vector128<T> min, Vector128<T> max) => Vector128.Clamp(value, min, max); 530static Vector128<T> ISimdVector<Vector128<T>, T>.ClampNative(Vector128<T> value, Vector128<T> min, Vector128<T> max) => Vector128.ClampNative(value, min, max); 534static Vector128<T> ISimdVector<Vector128<T>, T>.ConditionalSelect(Vector128<T> condition, Vector128<T> left, Vector128<T> right) => Vector128.ConditionalSelect(condition, left, right); 538static Vector128<T> ISimdVector<Vector128<T>, T>.CopySign(Vector128<T> value, Vector128<T> sign) => Vector128.CopySign(value, sign); 551static int ISimdVector<Vector128<T>, T>.Count(Vector128<T> vector, T value) => Vector128.Count(vector, value); 555static int ISimdVector<Vector128<T>, T>.CountWhereAllBitsSet(Vector128<T> vector) => Vector128.CountWhereAllBitsSet(vector); 559static Vector128<T> ISimdVector<Vector128<T>, T>.Create(T value) => Vector128.Create(value); 562static Vector128<T> ISimdVector<Vector128<T>, T>.Create(T[] values) => Vector128.Create(values); 565static Vector128<T> ISimdVector<Vector128<T>, T>.Create(T[] values, int index) => Vector128.Create(values, index); 568static Vector128<T> ISimdVector<Vector128<T>, T>.Create(ReadOnlySpan<T> values) => Vector128.Create(values); 572static Vector128<T> ISimdVector<Vector128<T>, T>.CreateScalar(T value) => Vector128.CreateScalar(value); 576static Vector128<T> ISimdVector<Vector128<T>, T>.CreateScalarUnsafe(T value) => Vector128.CreateScalarUnsafe(value); 588static T ISimdVector<Vector128<T>, T>.Dot(Vector128<T> left, Vector128<T> right) => Vector128.Dot(left, right); 592static Vector128<T> ISimdVector<Vector128<T>, T>.Equals(Vector128<T> left, Vector128<T> right) => Vector128.Equals(left, right); 600static bool ISimdVector<Vector128<T>, T>.EqualsAny(Vector128<T> left, Vector128<T> right) => Vector128.EqualsAny(left, right); 604static Vector128<T> ISimdVector<Vector128<T>, T>.Floor(Vector128<T> vector) => Vector128.Floor(vector); 612static Vector128<T> ISimdVector<Vector128<T>, T>.GreaterThan(Vector128<T> left, Vector128<T> right) => Vector128.GreaterThan(left, right); 616static bool ISimdVector<Vector128<T>, T>.GreaterThanAll(Vector128<T> left, Vector128<T> right) => Vector128.GreaterThanAll(left, right); 620static bool ISimdVector<Vector128<T>, T>.GreaterThanAny(Vector128<T> left, Vector128<T> right) => Vector128.GreaterThanAny(left, right); 624static Vector128<T> ISimdVector<Vector128<T>, T>.GreaterThanOrEqual(Vector128<T> left, Vector128<T> right) => Vector128.GreaterThanOrEqual(left, right); 628static bool ISimdVector<Vector128<T>, T>.GreaterThanOrEqualAll(Vector128<T> left, Vector128<T> right) => Vector128.GreaterThanOrEqualAll(left, right); 632static bool ISimdVector<Vector128<T>, T>.GreaterThanOrEqualAny(Vector128<T> left, Vector128<T> right) => Vector128.GreaterThanOrEqualAny(left, right); 636static int ISimdVector<Vector128<T>, T>.IndexOf(Vector128<T> vector, T value) => Vector128.IndexOf(vector, value); 640static int ISimdVector<Vector128<T>, T>.IndexOfWhereAllBitsSet(Vector128<T> vector) => Vector128.IndexOfWhereAllBitsSet(vector); 644static Vector128<T> ISimdVector<Vector128<T>, T>.IsEvenInteger(Vector128<T> vector) => Vector128.IsEvenInteger(vector); 648static Vector128<T> ISimdVector<Vector128<T>, T>.IsFinite(Vector128<T> vector) => Vector128.IsFinite(vector); 652static Vector128<T> ISimdVector<Vector128<T>, T>.IsInfinity(Vector128<T> vector) => Vector128.IsInfinity(vector); 656static Vector128<T> ISimdVector<Vector128<T>, T>.IsInteger(Vector128<T> vector) => Vector128.IsInteger(vector); 660static Vector128<T> ISimdVector<Vector128<T>, T>.IsNaN(Vector128<T> vector) => Vector128.IsNaN(vector); 664static Vector128<T> ISimdVector<Vector128<T>, T>.IsNegative(Vector128<T> vector) => Vector128.IsNegative(vector); 668static Vector128<T> ISimdVector<Vector128<T>, T>.IsNegativeInfinity(Vector128<T> vector) => Vector128.IsNegativeInfinity(vector); 672static Vector128<T> ISimdVector<Vector128<T>, T>.IsNormal(Vector128<T> vector) => Vector128.IsNormal(vector); 676static Vector128<T> ISimdVector<Vector128<T>, T>.IsOddInteger(Vector128<T> vector) => Vector128.IsOddInteger(vector); 680static Vector128<T> ISimdVector<Vector128<T>, T>.IsPositive(Vector128<T> vector) => Vector128.IsPositive(vector); 684static Vector128<T> ISimdVector<Vector128<T>, T>.IsPositiveInfinity(Vector128<T> vector) => Vector128.IsPositiveInfinity(vector); 688static Vector128<T> ISimdVector<Vector128<T>, T>.IsSubnormal(Vector128<T> vector) => Vector128.IsSubnormal(vector); 692static Vector128<T> ISimdVector<Vector128<T>, T>.IsZero(Vector128<T> vector) => Vector128.IsZero(vector); 696static int ISimdVector<Vector128<T>, T>.LastIndexOf(Vector128<T> vector, T value) => Vector128.LastIndexOf(vector, value); 700static int ISimdVector<Vector128<T>, T>.LastIndexOfWhereAllBitsSet(Vector128<T> vector) => Vector128.LastIndexOfWhereAllBitsSet(vector); 704static Vector128<T> ISimdVector<Vector128<T>, T>.LessThan(Vector128<T> left, Vector128<T> right) => Vector128.LessThan(left, right); 708static bool ISimdVector<Vector128<T>, T>.LessThanAll(Vector128<T> left, Vector128<T> right) => Vector128.LessThanAll(left, right); 712static bool ISimdVector<Vector128<T>, T>.LessThanAny(Vector128<T> left, Vector128<T> right) => Vector128.LessThanAny(left, right); 716static Vector128<T> ISimdVector<Vector128<T>, T>.LessThanOrEqual(Vector128<T> left, Vector128<T> right) => Vector128.LessThanOrEqual(left, right); 720static bool ISimdVector<Vector128<T>, T>.LessThanOrEqualAll(Vector128<T> left, Vector128<T> right) => Vector128.LessThanOrEqualAll(left, right); 724static bool ISimdVector<Vector128<T>, T>.LessThanOrEqualAny(Vector128<T> left, Vector128<T> right) => Vector128.LessThanOrEqualAny(left, right); 728static Vector128<T> ISimdVector<Vector128<T>, T>.Load(T* source) => Vector128.Load(source); 732static Vector128<T> ISimdVector<Vector128<T>, T>.LoadAligned(T* source) => Vector128.LoadAligned(source); 736static Vector128<T> ISimdVector<Vector128<T>, T>.LoadAlignedNonTemporal(T* source) => Vector128.LoadAlignedNonTemporal(source); 740static Vector128<T> ISimdVector<Vector128<T>, T>.LoadUnsafe(ref readonly T source) => Vector128.LoadUnsafe(in source); 744static Vector128<T> ISimdVector<Vector128<T>, T>.LoadUnsafe(ref readonly T source, nuint elementOffset) => Vector128.LoadUnsafe(in source, elementOffset); 748static Vector128<T> ISimdVector<Vector128<T>, T>.Max(Vector128<T> left, Vector128<T> right) => Vector128.Max(left, right); 752static Vector128<T> ISimdVector<Vector128<T>, T>.MaxMagnitude(Vector128<T> left, Vector128<T> right) => Vector128.MaxMagnitude(left, right); 756static Vector128<T> ISimdVector<Vector128<T>, T>.MaxMagnitudeNumber(Vector128<T> left, Vector128<T> right) => Vector128.MaxMagnitudeNumber(left, right); 760static Vector128<T> ISimdVector<Vector128<T>, T>.MaxNative(Vector128<T> left, Vector128<T> right) => Vector128.MaxNative(left, right); 764static Vector128<T> ISimdVector<Vector128<T>, T>.MaxNumber(Vector128<T> left, Vector128<T> right) => Vector128.MaxNumber(left, right); 768static Vector128<T> ISimdVector<Vector128<T>, T>.Min(Vector128<T> left, Vector128<T> right) => Vector128.Min(left, right); 772static Vector128<T> ISimdVector<Vector128<T>, T>.MinMagnitude(Vector128<T> left, Vector128<T> right) => Vector128.MinMagnitude(left, right); 776static Vector128<T> ISimdVector<Vector128<T>, T>.MinMagnitudeNumber(Vector128<T> left, Vector128<T> right) => Vector128.MinMagnitudeNumber(left, right); 780static Vector128<T> ISimdVector<Vector128<T>, T>.MinNative(Vector128<T> left, Vector128<T> right) => Vector128.MinNative(left, right); 784static Vector128<T> ISimdVector<Vector128<T>, T>.MinNumber(Vector128<T> left, Vector128<T> right) => Vector128.MinNumber(left, right); 796static Vector128<T> ISimdVector<Vector128<T>, T>.MultiplyAddEstimate(Vector128<T> left, Vector128<T> right, Vector128<T> addend) => Vector128.MultiplyAddEstimate(left, right, addend); 804static bool ISimdVector<Vector128<T>, T>.None(Vector128<T> vector, T value) => Vector128.None(vector, value); 808static bool ISimdVector<Vector128<T>, T>.NoneWhereAllBitsSet(Vector128<T> vector) => Vector128.NoneWhereAllBitsSet(vector); 816static Vector128<T> ISimdVector<Vector128<T>, T>.Round(Vector128<T> vector) => Vector128.Round(vector); 832static Vector128<T> ISimdVector<Vector128<T>, T>.Sqrt(Vector128<T> vector) => Vector128.Sqrt(vector); 860static T ISimdVector<Vector128<T>, T>.Sum(Vector128<T> vector) => Vector128.Sum(vector); 868static Vector128<T> ISimdVector<Vector128<T>, T>.Truncate(Vector128<T> vector) => Vector128.Truncate(vector);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (4)
4422Vector128.Create((byte)0, 0xFF, 1, 0xFF, 2, 0xFF, 3, 0xFF, 4, 0xFF, 5, 0xFF, 6, 0xFF, 7, 0xFF)); 4424Vector128.Create((byte)0xFF, 0, 0xFF, 1, 0xFF, 2, 0xFF, 3, 0xFF, 4, 0xFF, 5, 0xFF, 6, 0xFF, 7)); 4448Vector128.Create((byte)8, 0xFF, 9, 0xFF, 10, 0xFF, 11, 0xFF, 12, 0xFF, 13, 0xFF, 14, 0xFF, 15, 0xFF)); 4450Vector128.Create((byte)0xFF, 8, 0xFF, 9, 0xFF, 10, 0xFF, 11, 0xFF, 12, 0xFF, 13, 0xFF, 14, 0xFF, 15));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (318)
60/// <inheritdoc cref="Vector128.get_E{T}" /> 67/// <inheritdoc cref="Vector128.get_Pi{T}" /> 74/// <inheritdoc cref="Vector128.get_Tau{T}" /> 86/// <inheritdoc cref="Vector128.get_Epsilon{T}" /> 93/// <inheritdoc cref="Vector128.get_NaN{T}" /> 100/// <inheritdoc cref="Vector128.get_NegativeInfinity{T}" /> 107/// <inheritdoc cref="Vector128.get_NegativeZero{T}" /> 114/// <inheritdoc cref="Vector128.get_PositiveInfinity{T}" /> 126/// <inheritdoc cref="Vector128.get_NegativeOne{T}" /> 133/// <inheritdoc cref="Vector128.get_SignSequence{T}" /> 158Vector128.Abs(vector._lower), 159Vector128.Abs(vector._upper) 164/// <inheritdoc cref="Vector128.Add{T}(Vector128{T}, Vector128{T})" /> 168/// <inheritdoc cref="Vector128.AddSaturate{T}(Vector128{T}, Vector128{T})" /> 180Vector128.AddSaturate(left._lower, right._lower), 181Vector128.AddSaturate(left._upper, right._upper) 186/// <inheritdoc cref="Vector128.All{T}(Vector128{T}, T)" /> 191/// <inheritdoc cref="Vector128.AllWhereAllBitsSet{T}(Vector128{T})" /> 220/// <inheritdoc cref="Vector128.Any{T}(Vector128{T}, T)" /> 225/// <inheritdoc cref="Vector128.AnyWhereAllBitsSet{T}(Vector128{T})" /> 437Vector128.Ceiling(vector._lower), 438Vector128.Ceiling(vector._upper) 462/// <inheritdoc cref="Vector128.Clamp{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 470/// <inheritdoc cref="Vector128.ClampNative{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 516Vector128.ConvertToDouble(vector._lower), 517Vector128.ConvertToDouble(vector._upper) 549Vector128.ConvertToDouble(vector._lower), 550Vector128.ConvertToDouble(vector._upper) 563Vector128.ConvertToInt32(vector._lower), 564Vector128.ConvertToInt32(vector._upper) 576Vector128.ConvertToInt32Native(vector._lower), 577Vector128.ConvertToInt32Native(vector._upper) 589Vector128.ConvertToInt64(vector._lower), 590Vector128.ConvertToInt64(vector._upper) 602Vector128.ConvertToInt64Native(vector._lower), 603Vector128.ConvertToInt64Native(vector._upper) 615Vector128.ConvertToSingle(vector._lower), 616Vector128.ConvertToSingle(vector._upper) 661Vector128.ConvertToSingle(vector._lower), 662Vector128.ConvertToSingle(vector._upper) 676Vector128.ConvertToUInt32(vector._lower), 677Vector128.ConvertToUInt32(vector._upper) 690Vector128.ConvertToUInt32Native(vector._lower), 691Vector128.ConvertToUInt32Native(vector._upper) 704Vector128.ConvertToUInt64(vector._lower), 705Vector128.ConvertToUInt64(vector._upper) 718Vector128.ConvertToUInt64Native(vector._lower), 719Vector128.ConvertToUInt64Native(vector._upper) 723/// <inheritdoc cref="Vector128.CopySign{T}(Vector128{T}, Vector128{T})" /> 739Vector128.CopySign(value._lower, sign._lower), 740Vector128.CopySign(value._upper, sign._upper) 809/// <inheritdoc cref="Vector128.Asin(Vector128{double})" /> 820Vector128.Asin(vector._lower), 821Vector128.Asin(vector._upper) 826/// <inheritdoc cref="Vector128.Asin(Vector128{float})" /> 844Vector128.Asin(vector._lower), 845Vector128.Asin(vector._upper) 850/// <inheritdoc cref="Vector128.Cos(Vector128{double})" /> 861Vector128.Cos(vector._lower), 862Vector128.Cos(vector._upper) 867/// <inheritdoc cref="Vector128.Cos(Vector128{float})" /> 885Vector128.Cos(vector._lower), 886Vector128.Cos(vector._upper) 891/// <inheritdoc cref="Vector128.Count{T}(Vector128{T}, T)" /> 896/// <inheritdoc cref="Vector128.CountWhereAllBitsSet{T}(Vector128{T})" /> 923Vector128<T> vector = Vector128.Create(value); 1113Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 1114Vector128.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1130Vector128.Create(e0, e1), 1131Vector128.Create(e2, e3) 1159Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1160Vector128.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1180Vector128.Create(e0, e1, e2, e3), 1181Vector128.Create(e4, e5, e6, e7) 1197Vector128.Create(e0, e1), 1198Vector128.Create(e2, e3) 1244Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 1245Vector128.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1265Vector128.Create(e0, e1, e2, e3), 1266Vector128.Create(e4, e5, e6, e7) 1295Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1296Vector128.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1317Vector128.Create(e0, e1, e2, e3), 1318Vector128.Create(e4, e5, e6, e7) 1335Vector128.Create(e0, e1), 1336Vector128.Create(e2, e3) 1346public static Vector256<T> Create<T>(Vector64<T> value) => Create(Vector128.Create(value, value)); 1469public static Vector256<T> CreateScalar<T>(T value) => Vector128.CreateScalar(value).ToVector256(); 1698Vector128<T> sequence = Vector128.CreateAlternatingSequence(even, odd); 1720Vector128.CreateHarmonicSequence(start, step), 1721Vector128.CreateHarmonicSequence(upperStart, step) 1749Vector128.ZipLower(left.GetLower(), right.GetLower()), 1750Vector128.ZipUpper(left.GetLower(), right.GetLower()) 1757Vector128.ZipLower(left.GetUpper(), right.GetUpper()), 1758Vector128.ZipUpper(left.GetUpper(), right.GetUpper()) 1784Vector128.UnzipEven(left.GetLower(), left.GetUpper()), 1785Vector128.UnzipEven(right.GetLower(), right.GetUpper()) 1792Vector128.UnzipOdd(left.GetLower(), left.GetUpper()), 1793Vector128.UnzipOdd(right.GetLower(), right.GetUpper()) 1822Vector128.Reverse(vector.GetUpper()), 1823Vector128.Reverse(vector.GetLower()) 1826/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{double})" /> 1838Vector128.DegreesToRadians(degrees._lower), 1839Vector128.DegreesToRadians(degrees._upper) 1844/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{float})" /> 1863Vector128.DegreesToRadians(degrees._lower), 1864Vector128.DegreesToRadians(degrees._upper) 1907Vector128.Equals(left._lower, right._lower), 1908Vector128.Equals(left._upper, right._upper) 1931return Vector128.EqualsAny(left._lower, right._lower) 1932|| Vector128.EqualsAny(left._upper, right._upper); 1935/// <inheritdoc cref="Vector128.Exp(Vector128{double})" /> 1946Vector128.Exp(vector._lower), 1947Vector128.Exp(vector._upper) 1952/// <inheritdoc cref="Vector128.Exp(Vector128{float})" /> 1970Vector128.Exp(vector._lower), 1971Vector128.Exp(vector._upper) 2001Vector128.Floor(vector._lower), 2002Vector128.Floor(vector._upper) 2026/// <inheritdoc cref="Vector128.FusedMultiplyAdd(Vector128{double}, Vector128{double}, Vector128{double})" /> 2032Vector128.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 2033Vector128.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 2037/// <inheritdoc cref="Vector128.FusedMultiplyAdd(Vector128{float}, Vector128{float}, Vector128{float})" /> 2043Vector128.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 2044Vector128.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 2102Vector128.GreaterThan(left._lower, right._lower), 2103Vector128.GreaterThan(left._upper, right._upper) 2117return Vector128.GreaterThanAll(left._lower, right._lower) 2118&& Vector128.GreaterThanAll(left._upper, right._upper); 2131return Vector128.GreaterThanAny(left._lower, right._lower) 2132|| Vector128.GreaterThanAny(left._upper, right._upper); 2146Vector128.GreaterThanOrEqual(left._lower, right._lower), 2147Vector128.GreaterThanOrEqual(left._upper, right._upper) 2161return Vector128.GreaterThanOrEqualAll(left._lower, right._lower) 2162&& Vector128.GreaterThanOrEqualAll(left._upper, right._upper); 2175return Vector128.GreaterThanOrEqualAny(left._lower, right._lower) 2176|| Vector128.GreaterThanOrEqualAny(left._upper, right._upper); 2179/// <inheritdoc cref="Vector128.Hypot(Vector128{double}, Vector128{double})" /> 2190Vector128.Hypot(x._lower, y._lower), 2191Vector128.Hypot(x._upper, y._upper) 2196/// <inheritdoc cref="Vector128.Hypot(Vector128{float}, Vector128{float})" /> 2214Vector128.Hypot(x._lower, y._lower), 2215Vector128.Hypot(x._upper, y._upper) 2220/// <inheritdoc cref="Vector128.IndexOf{T}(Vector128{T}, T)" /> 2225/// <inheritdoc cref="Vector128.IndexOfWhereAllBitsSet{T}(Vector128{T})" /> 2244/// <inheritdoc cref="Vector128.IsEvenInteger{T}(Vector128{T})" /> 2260/// <inheritdoc cref="Vector128.IsFinite{T}(Vector128{T})" /> 2276/// <inheritdoc cref="Vector128.IsInfinity{T}(Vector128{T})" /> 2288/// <inheritdoc cref="Vector128.IsInteger{T}(Vector128{T})" /> 2300/// <inheritdoc cref="Vector128.IsNaN{T}(Vector128{T})" /> 2312/// <inheritdoc cref="Vector128.IsNegative{T}(Vector128{T})" /> 2335/// <inheritdoc cref="Vector128.IsNegativeInfinity{T}(Vector128{T})" /> 2351/// <inheritdoc cref="Vector128.IsNormal{T}(Vector128{T})" /> 2367/// <inheritdoc cref="Vector128.IsOddInteger{T}(Vector128{T})" /> 2383/// <inheritdoc cref="Vector128.IsPositive{T}(Vector128{T})" /> 2406/// <inheritdoc cref="Vector128.IsPositiveInfinity{T}(Vector128{T})" /> 2422/// <inheritdoc cref="Vector128.IsSubnormal{T}(Vector128{T})" /> 2438/// <inheritdoc cref="Vector128.IsZero{T}(Vector128{T})" /> 2443/// <inheritdoc cref="Vector128.LastIndexOf{T}(Vector128{T}, T)" /> 2448/// <inheritdoc cref="Vector128.LastIndexOfWhereAllBitsSet{T}(Vector128{T})" /> 2467/// <inheritdoc cref="Vector128.Lerp(Vector128{double}, Vector128{double}, Vector128{double})" /> 2479Vector128.Lerp(x._lower, y._lower, amount._lower), 2480Vector128.Lerp(x._upper, y._upper, amount._upper) 2485/// <inheritdoc cref="Vector128.Lerp(Vector128{float}, Vector128{float}, Vector128{float})" /> 2497Vector128.Lerp(x._lower, y._lower, amount._lower), 2498Vector128.Lerp(x._upper, y._upper, amount._upper) 2514Vector128.LessThan(left._lower, right._lower), 2515Vector128.LessThan(left._upper, right._upper) 2529return Vector128.LessThanAll(left._lower, right._lower) 2530&& Vector128.LessThanAll(left._upper, right._upper); 2543return Vector128.LessThanAny(left._lower, right._lower) 2544|| Vector128.LessThanAny(left._upper, right._upper); 2558Vector128.LessThanOrEqual(left._lower, right._lower), 2559Vector128.LessThanOrEqual(left._upper, right._upper) 2573return Vector128.LessThanOrEqualAll(left._lower, right._lower) 2574&& Vector128.LessThanOrEqualAll(left._upper, right._upper); 2587return Vector128.LessThanOrEqualAny(left._lower, right._lower) 2588|| Vector128.LessThanOrEqualAny(left._upper, right._upper); 2671/// <inheritdoc cref="Vector128.Log(Vector128{double})" /> 2682Vector128.Log(vector._lower), 2683Vector128.Log(vector._upper) 2688/// <inheritdoc cref="Vector128.Log(Vector128{float})" /> 2699Vector128.Log(vector._lower), 2700Vector128.Log(vector._upper) 2705/// <inheritdoc cref="Vector128.Log2(Vector128{double})" /> 2716Vector128.Log2(vector._lower), 2717Vector128.Log2(vector._upper) 2722/// <inheritdoc cref="Vector128.Log2(Vector128{float})" /> 2733Vector128.Log2(vector._lower), 2734Vector128.Log2(vector._upper) 2739/// <inheritdoc cref="Vector128.Max{T}(Vector128{T}, Vector128{T})" /> 2751Vector128.Max(left._lower, right._lower), 2752Vector128.Max(left._upper, right._upper) 2757/// <inheritdoc cref="Vector128.MaxMagnitude{T}(Vector128{T}, Vector128{T})" /> 2769Vector128.MaxMagnitude(left._lower, right._lower), 2770Vector128.MaxMagnitude(left._upper, right._upper) 2775/// <inheritdoc cref="Vector128.MaxMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2787Vector128.MaxMagnitudeNumber(left._lower, right._lower), 2788Vector128.MaxMagnitudeNumber(left._upper, right._upper) 2793/// <inheritdoc cref="Vector128.MaxNative{T}(Vector128{T}, Vector128{T})" /> 2805Vector128.MaxNative(left._lower, right._lower), 2806Vector128.MaxNative(left._upper, right._upper) 2811/// <inheritdoc cref="Vector128.MaxNumber{T}(Vector128{T}, Vector128{T})" /> 2823Vector128.MaxNumber(left._lower, right._lower), 2824Vector128.MaxNumber(left._upper, right._upper) 2829/// <inheritdoc cref="Vector128.Min{T}(Vector128{T}, Vector128{T})" /> 2841Vector128.Min(left._lower, right._lower), 2842Vector128.Min(left._upper, right._upper) 2847/// <inheritdoc cref="Vector128.MinMagnitude{T}(Vector128{T}, Vector128{T})" /> 2859Vector128.MinMagnitude(left._lower, right._lower), 2860Vector128.MinMagnitude(left._upper, right._upper) 2865/// <inheritdoc cref="Vector128.MinMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2877Vector128.MinMagnitudeNumber(left._lower, right._lower), 2878Vector128.MinMagnitudeNumber(left._upper, right._upper) 2883/// <inheritdoc cref="Vector128.MinNative{T}(Vector128{T}, Vector128{T})" /> 2895Vector128.MinNative(left._lower, right._lower), 2896Vector128.MinNative(left._upper, right._upper) 2901/// <inheritdoc cref="Vector128.MinNumber{T}(Vector128{T}, Vector128{T})" /> 2913Vector128.MinNumber(left._lower, right._lower), 2914Vector128.MinNumber(left._upper, right._upper) 2951Vector128.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2952Vector128.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2956/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{double}, Vector128{double}, Vector128{double})" /> 2962Vector128.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2963Vector128.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2967/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 2973Vector128.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2974Vector128.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 3001/// <inheritdoc cref="Vector128.Narrow(Vector128{double}, Vector128{double})"/> 3007/// <inheritdoc cref="Vector128.Narrow(Vector128{short}, Vector128{short})"/> 3014/// <inheritdoc cref="Vector128.Narrow(Vector128{int}, Vector128{int})"/> 3020/// <inheritdoc cref="Vector128.Narrow(Vector128{long}, Vector128{long})"/> 3026/// <inheritdoc cref="Vector128.Narrow(Vector128{ushort}, Vector128{ushort})"/> 3033/// <inheritdoc cref="Vector128.Narrow(Vector128{uint}, Vector128{uint})"/> 3040/// <inheritdoc cref="Vector128.Narrow(Vector128{ulong}, Vector128{ulong})"/> 3070/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{double}, Vector128{double})"/> 3076/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{short}, Vector128{short})"/> 3083/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{int}, Vector128{int})"/> 3089/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{long}, Vector128{long})"/> 3095/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ushort}, Vector128{ushort})"/> 3102/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{uint}, Vector128{uint})"/> 3109/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ulong}, Vector128{ulong})"/> 3124/// <inheritdoc cref="Vector128.None{T}(Vector128{T}, T)" /> 3129/// <inheritdoc cref="Vector128.NoneWhereAllBitsSet{T}(Vector128{T})" /> 3156/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{double})" /> 3168Vector128.RadiansToDegrees(radians._lower), 3169Vector128.RadiansToDegrees(radians._upper) 3174/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{float})" /> 3193Vector128.RadiansToDegrees(radians._lower), 3194Vector128.RadiansToDegrees(radians._upper) 3206Vector128.Round(vector._lower), 3207Vector128.Round(vector._upper) 3217/// <inheritdoc cref="Vector128.Round(Vector128{double})" /> 3221/// <inheritdoc cref="Vector128.Round(Vector128{float})" /> 3225/// <inheritdoc cref="Vector128.Round(Vector128{double}, MidpointRounding)" /> 3229/// <inheritdoc cref="Vector128.Round(Vector128{float}, MidpointRounding)" /> 3311Vector128.ShiftLeft(vector._lower, shiftCount._lower), 3312Vector128.ShiftLeft(vector._upper, shiftCount._upper) 3328Vector128.ShiftLeft(vector._lower, shiftCount._lower), 3329Vector128.ShiftLeft(vector._upper, shiftCount._upper) 3613/// <inheritdoc cref="Vector128.Sin(Vector128{double})" /> 3624Vector128.Sin(vector._lower), 3625Vector128.Sin(vector._upper) 3630/// <inheritdoc cref="Vector128.Sin(Vector128{float})" /> 3648Vector128.Sin(vector._lower), 3649Vector128.Sin(vector._upper) 3654/// <inheritdoc cref="Vector128.SinCos(Vector128{double})" /> 3664(Vector128<double> sinLower, Vector128<double> cosLower) = Vector128.SinCos(vector._lower); 3665(Vector128<double> sinUpper, Vector128<double> cosUpper) = Vector128.SinCos(vector._upper); 3674/// <inheritdoc cref="Vector128.SinCos(Vector128{float})" /> 3691(Vector128<float> sinLower, Vector128<float> cosLower) = Vector128.SinCos(vector._lower); 3692(Vector128<float> sinUpper, Vector128<float> cosUpper) = Vector128.SinCos(vector._upper); 3711Vector128.Sqrt(vector._lower), 3712Vector128.Sqrt(vector._upper) 3785/// <inheritdoc cref="Vector128.Subtract{T}(Vector128{T}, Vector128{T})" /> 3789/// <inheritdoc cref="Vector128.SubtractSaturate{T}(Vector128{T}, Vector128{T})" /> 3801Vector128.SubtractSaturate(left._lower, right._lower), 3802Vector128.SubtractSaturate(left._upper, right._upper) 3820T result = Vector128.Sum(vector._lower); 3821result = Scalar<T>.Add(result, Vector128.Sum(vector._upper)); 3877Vector128.Truncate(vector._lower), 3878Vector128.Truncate(vector._upper) 3888/// <inheritdoc cref="Vector128.Truncate(Vector128{double})" /> 3892/// <inheritdoc cref="Vector128.Truncate(Vector128{float})" /> 3971Vector128.WidenLower(lower), 3972Vector128.WidenUpper(lower) 3986Vector128.WidenLower(lower), 3987Vector128.WidenUpper(lower) 4001Vector128.WidenLower(lower), 4002Vector128.WidenUpper(lower) 4017Vector128.WidenLower(lower), 4018Vector128.WidenUpper(lower) 4031Vector128.WidenLower(lower), 4032Vector128.WidenUpper(lower) 4047Vector128.WidenLower(lower), 4048Vector128.WidenUpper(lower) 4063Vector128.WidenLower(lower), 4064Vector128.WidenUpper(lower) 4079Vector128.WidenLower(upper), 4080Vector128.WidenUpper(upper) 4094Vector128.WidenLower(upper), 4095Vector128.WidenUpper(upper) 4109Vector128.WidenLower(upper), 4110Vector128.WidenUpper(upper) 4125Vector128.WidenLower(upper), 4126Vector128.WidenUpper(upper) 4140Vector128.WidenLower(upper), 4141Vector128.WidenUpper(upper) 4156Vector128.WidenLower(upper), 4157Vector128.WidenUpper(upper) 4172Vector128.WidenLower(upper), 4173Vector128.WidenUpper(upper) 4250return Vector128.CountMatches(vector._lower) 4251+ Vector128.CountMatches(vector._upper); 4273int result = Vector128.IndexOfFirstMatch(vector._lower); 4280result = Vector128.IndexOfFirstMatch(vector._upper); 4294int result = Vector128.IndexOfLastMatch(vector._upper); 4300return Vector128.IndexOfLastMatch(vector._lower);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (29)
60/// <inheritdoc cref="Vector128.get_E{T}" /> 67/// <inheritdoc cref="Vector128.get_Pi{T}" /> 74/// <inheritdoc cref="Vector128.get_Tau{T}" /> 86/// <inheritdoc cref="Vector128.get_Epsilon{T}" /> 93/// <inheritdoc cref="Vector128.get_NaN{T}" /> 100/// <inheritdoc cref="Vector128.get_NegativeInfinity{T}" /> 107/// <inheritdoc cref="Vector128.get_NegativeZero{T}" /> 114/// <inheritdoc cref="Vector128.get_PositiveInfinity{T}" /> 126/// <inheritdoc cref="Vector128.get_NegativeOne{T}" /> 133/// <inheritdoc cref="Vector128.get_SignSequence{T}" /> 164/// <inheritdoc cref="Vector128.Add{T}(Vector128{T}, Vector128{T})" /> 168/// <inheritdoc cref="Vector128.AddSaturate{T}(Vector128{T}, Vector128{T})" /> 1379public static Vector512<T> Create<T>(Vector64<T> value) => Create(Vector128.Create(value, value)); 3035/// <inheritdoc cref="Vector128.Narrow(Vector128{double}, Vector128{double})"/> 3041/// <inheritdoc cref="Vector128.Narrow(Vector128{short}, Vector128{short})"/> 3048/// <inheritdoc cref="Vector128.Narrow(Vector128{int}, Vector128{int})"/> 3054/// <inheritdoc cref="Vector128.Narrow(Vector128{long}, Vector128{long})"/> 3060/// <inheritdoc cref="Vector128.Narrow(Vector128{ushort}, Vector128{ushort})"/> 3067/// <inheritdoc cref="Vector128.Narrow(Vector128{uint}, Vector128{uint})"/> 3074/// <inheritdoc cref="Vector128.Narrow(Vector128{ulong}, Vector128{ulong})"/> 3104/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{double}, Vector128{double})"/> 3110/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{short}, Vector128{short})"/> 3117/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{int}, Vector128{int})"/> 3123/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{long}, Vector128{long})"/> 3129/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ushort}, Vector128{ushort})"/> 3136/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{uint}, Vector128{uint})"/> 3143/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ulong}, Vector128{ulong})"/> 3798/// <inheritdoc cref="Vector128.Subtract{T}(Vector128{T}, Vector128{T})" /> 3802/// <inheritdoc cref="Vector128.SubtractSaturate{T}(Vector128{T}, Vector128{T})" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (36)
33/// <inheritdoc cref="Vector128.get_E{T}" /> 40/// <inheritdoc cref="Vector128.get_Pi{T}" /> 47/// <inheritdoc cref="Vector128.get_Tau{T}" /> 59/// <inheritdoc cref="Vector128.get_Epsilon{T}" /> 66/// <inheritdoc cref="Vector128.get_NaN{T}" /> 73/// <inheritdoc cref="Vector128.get_NegativeInfinity{T}" /> 80/// <inheritdoc cref="Vector128.get_NegativeZero{T}" /> 87/// <inheritdoc cref="Vector128.get_PositiveInfinity{T}" /> 99/// <inheritdoc cref="Vector128.get_NegativeOne{T}" /> 106/// <inheritdoc cref="Vector128.get_SignSequence{T}" /> 142/// <inheritdoc cref="Vector128.Add{T}(Vector128{T}, Vector128{T})" /> 146/// <inheritdoc cref="Vector128.AddSaturate{T}(Vector128{T}, Vector128{T})" /> 800if (Vector128.IsHardwareAccelerated) 839if (Vector128.IsHardwareAccelerated) 1699if (Vector128.IsHardwareAccelerated) 1829if (Vector128.IsHardwareAccelerated) 2138if (Vector128.IsHardwareAccelerated) 3100/// <inheritdoc cref="Vector128.Narrow(Vector128{double}, Vector128{double})"/> 3106/// <inheritdoc cref="Vector128.Narrow(Vector128{short}, Vector128{short})"/> 3113/// <inheritdoc cref="Vector128.Narrow(Vector128{int}, Vector128{int})"/> 3119/// <inheritdoc cref="Vector128.Narrow(Vector128{long}, Vector128{long})"/> 3125/// <inheritdoc cref="Vector128.Narrow(Vector128{ushort}, Vector128{ushort})"/> 3132/// <inheritdoc cref="Vector128.Narrow(Vector128{uint}, Vector128{uint})"/> 3139/// <inheritdoc cref="Vector128.Narrow(Vector128{ulong}, Vector128{ulong})"/> 3169/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{double}, Vector128{double})"/> 3175/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{short}, Vector128{short})"/> 3182/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{int}, Vector128{int})"/> 3188/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{long}, Vector128{long})"/> 3194/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ushort}, Vector128{ushort})"/> 3201/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{uint}, Vector128{uint})"/> 3208/// <inheritdoc cref="Vector128.NarrowWithSaturation(Vector128{ulong}, Vector128{ulong})"/> 3304if (Vector128.IsHardwareAccelerated) 3777if (Vector128.IsHardwareAccelerated) 3832if (Vector128.IsHardwareAccelerated) 3936/// <inheritdoc cref="Vector128.Subtract{T}(Vector128{T}, Vector128{T})" /> 3940/// <inheritdoc cref="Vector128.SubtractSaturate{T}(Vector128{T}, Vector128{T})" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (15)
2534result = (TVectorDouble)(object)Vector128.ConvertToDouble((Vector128<long>)(object)vector); 2569result = (TVectorSingle)(object)Vector128.ConvertToSingle((Vector128<int>)(object)vector); 2693result = (TVectorDouble)(object)Vector128.FusedMultiplyAdd((Vector128<double>)(object)left, (Vector128<double>)(object)right, (Vector128<double>)(object)addend); 2727result = (TVector)(object)Vector128.Create(value); 2761result = (TVector)(object)Vector128.Create(value); 2815result = (TVectorSingle)(object)Vector128.Narrow(value.GetLower(), value.GetUpper()); 2860result = (TVectorSingle)(object)Vector128.Narrow((Vector128<double>)(object)lower, (Vector128<double>)(object)upper); 2902result = (TVectorUInt32)(object)Vector128.ShiftLeft( 2951result = (TVectorUInt64)(object)Vector128.ShiftLeft( 3113Vector128<float> value = Vector128.Create((Vector64<float>)(object)vector, (Vector64<float>)(object)vector); 3123result = (TVectorDouble)(object)Vector128.Create(lower, upper); 3138Vector128<double> lower = Vector128.WidenLower(value); 3139Vector128<double> upper = Vector128.WidenUpper(value); 3190result = (TVectorDouble)(object)Vector128.WidenLower((Vector128<float>)(object)vector); 3230result = (TVectorDouble)(object)Vector128.WidenUpper((Vector128<float>)(object)vector);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (48)
383Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 384Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 407Vector128<short> source0 = Vector128.LoadUnsafe(ref firstVector); 408Vector128<short> source1 = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 515Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 516Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 537Vector128<short> source0 = Vector128.LoadUnsafe(ref searchSpace); 538Vector128<short> source1 = Vector128.LoadUnsafe(ref secondVector); 636Vector128<byte> source0 = Vector128.LoadUnsafe(ref firstVector); 637Vector128<byte> source1 = Vector128.LoadUnsafe(ref halfVectorAwayFromEnd); 662Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 687Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 761Vector128<byte> source0 = Vector128.LoadUnsafe(ref searchSpace); 762Vector128<byte> source1 = Vector128.LoadUnsafe(ref secondVector); 789Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 812Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 908Vector128<byte> source0 = Vector128.LoadUnsafe(ref firstVector); 909Vector128<byte> source1 = Vector128.LoadUnsafe(ref halfVectorAwayFromEnd); 937Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 962Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 1036Vector128<byte> source0 = Vector128.LoadUnsafe(ref searchSpace); 1037Vector128<byte> source1 = Vector128.LoadUnsafe(ref secondVector); 1067Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 1090Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 1135: source & Vector128.Create((byte)0xF); 1142return Vector128.Equals(source, values); 1150: source & Vector128.Create((byte)0xF); 1164Vector128<byte> bitPositions = SearchValues.ShuffleNativeModified(Vector128.Create(0x8040201008040201, 0).AsByte(), highNibbles); 1213Vector128<byte> lowNibbles = source & Vector128.Create((byte)0xF); 1216Vector128<byte> row0 = Vector128.ShuffleNative(bitmapLookup0, lowNibbles); 1217Vector128<byte> row1 = Vector128.ShuffleNative(bitmapLookup1, lowNibbles); 1219Vector128<byte> bitmask = Vector128.ShuffleNative(Vector128.Create(0x8040201008040201).AsByte(), highNibbles); 1221Vector128<byte> mask = Vector128.GreaterThan(highNibbles.AsSByte(), Vector128.Create((sbyte)0x7)).AsByte(); 1222Vector128<byte> bitsets = Vector128.ConditionalSelect(mask, row1, row0); 1224Vector128<byte> result = Vector128.Equals(bitsets & bitmask, bitmask); 1327public static int IndexOfFirstMatch(Vector128<byte> result) => Vector128.IndexOfFirstMatch(~Vector128.Equals(result, Vector128<byte>.Zero)); 1331public static int IndexOfLastMatch(Vector128<byte> result) => Vector128.IndexOfLastMatch(~Vector128.Equals(result, Vector128<byte>.Zero)); 1346public static Vector128<byte> NegateIfNeeded(Vector128<byte> result) => Vector128.Equals(result, Vector128<byte>.Zero); 1356return Vector128.IndexOfFirstMatch(result); 1367return Vector128.IndexOfLastMatch(result); 1393Vector128<short> lowerMin = Vector128.Min(lower, Vector128.Create((ushort)255)).AsInt16(); 1394Vector128<short> upperMin = Vector128.Min(upper, Vector128.Create((ushort)255)).AsInt16();
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (20)
226Vector128<ushort> source0 = Vector128.LoadUnsafe(ref searchSpace); 227Vector128<ushort> source1 = Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<ushort>.Count); 234sourceLower = Sse2.PackUnsignedSaturate((source0 & Vector128.Create((ushort)255)).AsInt16(), (source1 & Vector128.Create((ushort)255)).AsInt16()); 244sourceLower = PackedSimd.ConvertNarrowingSaturateUnsigned((source0 & Vector128.Create((ushort)255)).AsInt16(), (source1 & Vector128.Create((ushort)255)).AsInt16()); 272Vector128<byte> bitPositions = Vector128.ShuffleNative(Vector128.Create(0x8040201008040201).AsByte(), shifted); 274Vector128<byte> index = values & Vector128.Create((byte)VectorizedIndexMask); 283Vector128<byte> bitMaskLower = Vector128.ShuffleNative(charMapLower, index); 284Vector128<byte> bitMaskUpper = Vector128.ShuffleNative(charMapUpper, index - Vector128.Create((byte)16)); 285Vector128<byte> mask = Vector128.GreaterThan(index, Vector128.Create((byte)15)); 286bitMask = Vector128.ConditionalSelect(mask, bitMaskUpper, bitMaskLower); 289return Vector128.Equals(bitMask & bitPositions, Vector128<byte>.Zero); 520Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 521Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count); 698Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 699Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.cs (2)
290/// Same as <see cref="Vector128.ShuffleNative(Vector128{byte}, Vector128{byte})"/>, except that we guarantee that <see cref="Ssse3.Shuffle(Vector128{byte}, Vector128{byte})"/> is used when available. 303return Vector128.Shuffle(vector, indices);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (1)
544uint resultMask = (~Vector128.Equals(result, Vector128<byte>.Zero)).ExtractMostSignificantBits();
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (17)
150Vector128.LoadUnsafe(ref value.GetRawStringDataAsUInt16()), 151Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref value.GetRawStringDataAsUInt16(), SecondReadByteOffset))); 156Value256 = Vector256.Create(Vector128.Create( 166Value256 = Vector256.Create(Vector128.Create(Vector64.Create( 192Vector128.LoadUnsafe(ref matchStart), 193Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset))); 199Vector128<ushort> different = Vector128.LoadUnsafe(ref matchStart) ^ Value256.GetLower(); 200different |= Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset)) ^ Value256.GetUpper(); 214Vector128.LoadUnsafe(ref matchStart), 215Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset))); 221Vector128<ushort> different = (Vector128.LoadUnsafe(ref matchStart) & ToUpperMask256.GetLower()) ^ Value256.GetLower(); 222different |= (Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset)) & ToUpperMask256.GetUpper()) ^ Value256.GetUpper(); 311public static Vector128<byte> TransformInput(Vector128<byte> input) => input & Vector128.Create(unchecked((byte)~0x20)); 382Vector128<byte> subtraction = Vector128.Create((byte)(128 + 'a')); 383Vector128<byte> comparison = Vector128.Create((byte)(128 + 26)); 384Vector128<byte> caseConversion = Vector128.Create((byte)0x20); 386Vector128<byte> matches = Vector128.LessThan((input - subtraction).AsSByte(), comparison.AsSByte()).AsByte();
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (8)
225Vector128<ushort> source0 = Vector128.LoadUnsafe(ref source); 226Vector128<ushort> source1 = Vector128.LoadUnsafe(ref source, (nuint)Vector128<ushort>.Count); 296: input & Vector128.Create((byte)0xF); 333return SearchValues.ShuffleNativeModified(maskLow, low) & Vector128.ShuffleNative(maskHigh, high); 377Vector128.Create((byte)15, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF)); 379Vector128.Create((byte)0xFF, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)); 413Vector128.Create((byte)14, 15, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF)); 415Vector128.Create((byte)0xFF, 0xFF, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13));
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesPackedThreeChars.cs (12)
187Vector128<byte> ch1 = Vector128.Create(_ch1); 188Vector128<byte> ch2 = Vector128.Create(_ch2); 189Vector128<byte> ch3 = Vector128.Create(_ch3); 259Vector128<byte> cmpCh1 = Vector128.Equals(ch1, LoadPacked128(ref searchSpace, 0)); 260Vector128<byte> cmpCh2 = Vector128.Equals(ch2, LoadPacked128(ref searchSpace, ch2ByteOffset)); 261Vector128<byte> cmpCh3 = Vector128.Equals(ch3, LoadPacked128(ref searchSpace, ch3ByteOffset)); 270Vector128<byte> caseConversion = Vector128.Create(CaseConversionMask); 272Vector128<byte> cmpCh1 = Vector128.Equals(ch1, LoadPacked128(ref searchSpace, 0) & caseConversion); 273Vector128<byte> cmpCh2 = Vector128.Equals(ch2, LoadPacked128(ref searchSpace, ch2ByteOffset) & caseConversion); 274Vector128<byte> cmpCh3 = Vector128.Equals(ch3, LoadPacked128(ref searchSpace, ch3ByteOffset) & caseConversion); 395Vector128<ushort> input0 = Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref searchSpace, byteOffset)); 396Vector128<ushort> input1 = Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref searchSpace, byteOffset + (uint)Vector128<byte>.Count));
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (17)
82if (!Vector128.IsHardwareAccelerated || searchSpaceMinusValueTailLength < Vector128<ushort>.Count) 187Vector128<ushort> ch1 = Vector128.Create(_ch1); 188Vector128<ushort> ch2 = Vector128.Create(_ch2); 189Vector128<ushort> ch3 = Vector128.Create(_ch3); 258Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace)); 259Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 260Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 269Vector128<ushort> caseConversion = Vector128.Create(CaseConversionMask); 271Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace) & caseConversion); 272Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 273Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (1)
376if (Vector128.IsHardwareAccelerated && value.Length > 1 && value.Length <= maxLength)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (57)
31if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<byte>.Count) 197Vector128<byte> ch1 = Vector128.Create(value); 198Vector128<byte> ch2 = Vector128.Create(ch2Val); 209Vector128<byte> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 210Vector128<byte> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace, (nuint)offset)); 267if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<byte>.Count) 404Vector128<byte> ch1 = Vector128.Create(value); 405Vector128<byte> ch2 = Vector128.Create(ch2Val); 409Vector128<byte> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace, (nuint)offset)); 410Vector128<byte> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 460if (Vector128.IsHardwareAccelerated) 530Vector128<byte> search = Vector128.Load(searchSpace + offset); 533uint matches = Vector128.Equals(Vector128<byte>.Zero, search).ExtractMostSignificantBits(); 610Vector128<byte> search = Vector128.Load(searchSpace + offset); 613uint matches = Vector128.Equals(Vector128<byte>.Zero, search).ExtractMostSignificantBits(); 643Vector128<byte> search = Vector128.Load(searchSpace + offset); 646uint matches = Vector128.Equals(Vector128<byte>.Zero, search).ExtractMostSignificantBits(); 683Vector128<byte> search = Vector128.Load(searchSpace + offset); 686uint matches = Vector128.Equals(Vector128<byte>.Zero, search).ExtractMostSignificantBits(); 706else if (Vector128.IsHardwareAccelerated) 714Vector128<byte> search = Vector128.Load(searchSpace + offset); 717Vector128<byte> compareResult = Vector128.Equals(Vector128<byte>.Zero, search); 821if (Vector128.IsHardwareAccelerated) 893if (Vector128.LoadUnsafe(ref first, offset) != 894Vector128.LoadUnsafe(ref second, offset)) 903if (Vector128.LoadUnsafe(ref first, lengthToExamine) == 904Vector128.LoadUnsafe(ref second, lengthToExamine)) 916if (Vector128.IsHardwareAccelerated) 1066matches = Vector128.Equals(Vector128.LoadUnsafe(ref first, offset), Vector128.LoadUnsafe(ref second, offset)).ExtractMostSignificantBits(); 1079matches = Vector128.Equals(Vector128.LoadUnsafe(ref first, offset), Vector128.LoadUnsafe(ref second, offset)).ExtractMostSignificantBits(); 1097else if (Vector128.IsHardwareAccelerated) 1104if (Vector128.LoadUnsafe(ref first, offset) == Vector128.LoadUnsafe(ref second, offset)) 1115if (Vector128.LoadUnsafe(ref first, offset) == Vector128.LoadUnsafe(ref second, offset)) 1156if (!Vector128.IsHardwareAccelerated || length < (nuint)Vector128<byte>.Count) 1212maskVec = Vector128.Equals( 1213Vector128.LoadUnsafe(ref first, i), 1214Vector128.LoadUnsafe(ref second, i)); 1227maskVec = Vector128.Equals( 1228Vector128.LoadUnsafe(ref first, i), 1229Vector128.LoadUnsafe(ref second, i)); 1391else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<byte>.Count * 2) 1397Vector128<byte> tempFirst = Vector128.LoadUnsafe(ref buf, (nuint)offset); 1398Vector128<byte> tempLast = Vector128.LoadUnsafe(ref buf, (nuint)lastOffset); 1408tempFirst = Vector128.Shuffle(tempFirst, Vector128.Create( 1410tempLast = Vector128.Shuffle(tempLast, Vector128.Create(
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (28)
33if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 210Vector128<ushort> ch1 = Vector128.Create((ushort)valueHead); 211Vector128<ushort> ch2 = Vector128.Create(ch2Val); 221Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 222Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace, (nuint)offset)); 280if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 425Vector128<ushort> ch1 = Vector128.Create((ushort)value); 426Vector128<ushort> ch2 = Vector128.Create((ushort)ch2Val); 430Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace, (nuint)offset)); 431Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 544else if (Vector128.IsHardwareAccelerated) 602uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 704uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 746uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 792uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 814else if (Vector128.IsHardwareAccelerated) 830Vector128<ushort> compareResult = Vector128.Equals(Vector128<ushort>.Zero, search); 973else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<ushort>.Count * 2) 981Vector128<ushort> tempFirst = Vector128.LoadUnsafe(ref first); 982Vector128<ushort> tempLast = Vector128.LoadUnsafe(ref last); 992tempFirst = Vector128.Shuffle(tempFirst, Vector128.Create((ushort)7, 6, 5, 4, 3, 2, 1, 0)); 993tempLast = Vector128.Shuffle(tempLast, Vector128.Create((ushort)7, 6, 5, 4, 3, 2, 1, 0));
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (14)
155else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<int>.Count * 2) 161Vector128<int> tempFirst = Vector128.LoadUnsafe(ref buf, (nuint)offset); 162Vector128<int> tempLast = Vector128.LoadUnsafe(ref buf, (nuint)lastOffset); 172tempFirst = Vector128.Shuffle(tempFirst, Vector128.Create(3, 2, 1, 0)); 173tempLast = Vector128.Shuffle(tempLast, Vector128.Create(3, 2, 1, 0)); 260else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<long>.Count * 2) 266Vector128<long> tempFirst = Vector128.LoadUnsafe(ref buf, (nuint)offset); 267Vector128<long> tempLast = Vector128.LoadUnsafe(ref buf, (nuint)lastOffset); 277tempFirst = Vector128.Shuffle(tempFirst, Vector128.Create(1, 0)); 278tempLast = Vector128.Shuffle(tempLast, Vector128.Create(1, 0));
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (46)
250Vector128<byte> packedValue = Vector128.Create((byte)value); 271Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 272Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 274Vector128<byte> result = Vector128.Equals(packedValue, packedSource); 295Vector128<short> source0 = Vector128.LoadUnsafe(ref firstVector); 296Vector128<short> source1 = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 298Vector128<byte> result = Vector128.Equals(packedValue, packedSource); 451Vector128<byte> packedValue = Vector128.Create((byte)value); 472Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 473Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 475Vector128<byte> result = Vector128.Equals(packedValue, packedSource); 497Vector128<short> source0 = Vector128.LoadUnsafe(ref firstVector); 498Vector128<short> source1 = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 500Vector128<byte> result = Vector128.Equals(packedValue, packedSource); 664Vector128<byte> packedValue0 = Vector128.Create((byte)value0); 665Vector128<byte> packedValue1 = Vector128.Create((byte)value1); 686Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 687Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 689Vector128<byte> result = Vector128.Equals(packedValue0, packedSource) | Vector128.Equals(packedValue1, packedSource); 711Vector128<short> source0 = Vector128.LoadUnsafe(ref firstVector); 712Vector128<short> source1 = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 714Vector128<byte> result = Vector128.Equals(packedValue0, packedSource) | Vector128.Equals(packedValue1, packedSource); 881Vector128<byte> packedValue0 = Vector128.Create((byte)value0); 882Vector128<byte> packedValue1 = Vector128.Create((byte)value1); 883Vector128<byte> packedValue2 = Vector128.Create((byte)value2); 904Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 905Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 907Vector128<byte> result = Vector128.Equals(packedValue0, packedSource) | Vector128.Equals(packedValue1, packedSource) | Vector128.Equals(packedValue2, packedSource); 929Vector128<short> source0 = Vector128.LoadUnsafe(ref firstVector); 930Vector128<short> source1 = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 932Vector128<byte> result = Vector128.Equals(packedValue0, packedSource) | Vector128.Equals(packedValue1, packedSource) | Vector128.Equals(packedValue2, packedSource); 1077Vector128<byte> lowVector = Vector128.Create((byte)lowInclusive); 1078Vector128<byte> rangeVector = Vector128.Create((byte)rangeInclusive); 1099Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 1100Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 1102Vector128<byte> result = Vector128.LessThanOrEqual(packedSource - lowVector, rangeVector); 1124Vector128<short> source0 = Vector128.LoadUnsafe(ref firstVector); 1125Vector128<short> source1 = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 1127Vector128<byte> result = Vector128.LessThanOrEqual(packedSource - lowVector, rangeVector); 1340public static Vector128<byte> TransformInput(Vector128<byte> input) => input | Vector128.Create((byte)0x20);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (151)
1477if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 1590Vector128<T> equals, values = Vector128.Create(value); 1597equals = Vector128.Equals(values, Vector128.LoadUnsafe(ref currentSearchSpace)); 1611equals = Vector128.Equals(values, Vector128.LoadUnsafe(ref oneVectorAwayFromEnd)); 1664if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 1809Vector128<TValue> equals, values = Vector128.Create(value); 1816equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref currentSearchSpace))); 1830equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref oneVectorAwayFromEnd))); 1898if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2075Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1); 2082current = Vector128.LoadUnsafe(ref currentSearchSpace); 2083equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current)); 2097current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 2098equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current)); 2139if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2316Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2); 2323current = Vector128.LoadUnsafe(ref currentSearchSpace); 2324equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current)); 2338current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 2339equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current)); 2365if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2487Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2), values3 = Vector128.Create(value3); 2494current = Vector128.LoadUnsafe(ref currentSearchSpace); 2495equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) 2496| Vector128.Equals(values2, current) | Vector128.Equals(values3, current)); 2510current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 2511equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) 2512| Vector128.Equals(values2, current) | Vector128.Equals(values3, current)); 2538if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2662Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), 2663values2 = Vector128.Create(value2), values3 = Vector128.Create(value3), values4 = Vector128.Create(value4); 2670current = Vector128.LoadUnsafe(ref currentSearchSpace); 2671equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current) 2672| Vector128.Equals(values3, current) | Vector128.Equals(values4, current)); 2686current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 2687equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current) 2688| Vector128.Equals(values3, current) | Vector128.Equals(values4, current)); 2714if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2858if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3031Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1); 3037current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3038equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1)); 3049current = Vector128.LoadUnsafe(ref searchSpace); 3050equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1)); 3075if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3246Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2); 3252current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3253equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2)); 3265current = Vector128.LoadUnsafe(ref searchSpace); 3266equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2)); 3292if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3403Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2), values3 = Vector128.Create(value3); 3409current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3410equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) | Vector128.Equals(current, values3)); 3421current = Vector128.LoadUnsafe(ref searchSpace); 3422equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) | Vector128.Equals(current, values3)); 3456if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<T>.Count) 3466Debug.Assert(Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported, "Vector128 is not HW-accelerated or not supported"); 3473Vector128<T> oldValues = Vector128.Create(oldValue); 3474Vector128<T> newValues = Vector128.Create(newValue); 3479original = Vector128.LoadUnsafe(ref src, idx); 3480mask = Vector128.Equals(oldValues, original); 3481result = Vector128.ConditionalSelect(mask, newValues, original); 3493original = Vector128.LoadUnsafe(ref src, lastVectorIndex); 3494mask = Vector128.Equals(oldValues, original); 3495result = Vector128.ConditionalSelect(mask, newValues, original); 3564if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3678Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), 3679values2 = Vector128.Create(value2), values3 = Vector128.Create(value3), values4 = Vector128.Create(value4); 3685current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3686equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) 3687| Vector128.Equals(current, values3) | Vector128.Equals(current, values4)); 3700current = Vector128.LoadUnsafe(ref searchSpace); 3701equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) 3702| Vector128.Equals(current, values3) | Vector128.Equals(current, values4)); 3889if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 3903Vector128<T> lowVector = Vector128.Create(lowInclusive); 3904Vector128<T> rangeVector = Vector128.Create(highInclusive - lowInclusive); 3913inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref current) - lowVector, rangeVector)); 3924inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref oneVectorAwayFromEnd) - lowVector, rangeVector)); 4036if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 4050Vector128<T> lowVector = Vector128.Create(lowInclusive); 4051Vector128<T> rangeVector = Vector128.Create(highInclusive - lowInclusive); 4059inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref searchSpace, (nuint)offset) - lowVector, rangeVector)); 4069inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref searchSpace) - lowVector, rangeVector)); 4171if (Vector128.IsHardwareAccelerated && length >= Vector128<T>.Count) 4205Vector128<T> targetVector = Vector128.Create(value); 4209count += BitOperations.PopCount(Vector128.Equals(Vector128.LoadUnsafe(ref current), targetVector).ExtractMostSignificantBits()); 4214uint mask = Vector128.Equals(Vector128.LoadUnsafe(ref oneVectorAwayFromEnd), targetVector).ExtractMostSignificantBits();
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (29)
1333else if (Vector128.IsHardwareAccelerated && length >= (uint)Vector128<ushort>.Count) 2081if (Vector128.IsHardwareAccelerated && source.Length >= Vector128<ushort>.Count * 2) 2118if (!Vector128.IsHardwareAccelerated) 2317else if (Vector128.IsHardwareAccelerated) 2319Vector128<ushort> v1 = Vector128.Create((ushort)c); 2320Vector128<ushort> v2 = Vector128.Create((ushort)c2); 2321Vector128<ushort> v3 = Vector128.Create((ushort)c3); 2329Vector128<byte> packedComparand1 = Vector128.Create((byte)c); 2330Vector128<byte> packedComparand2 = Vector128.Create((byte)c2); 2331Vector128<byte> packedComparand3 = Vector128.Create((byte)c3); 2334Vector128<ushort> vector1 = Vector128.Create(remaining); 2335Vector128<ushort> vector2 = Vector128.Create(remaining.Slice(Vector128<ushort>.Count)); 2338if ((Vector128.Equals(packed, packedComparand1) | Vector128.Equals(packed, packedComparand2) | Vector128.Equals(packed, packedComparand3)) != Vector128<byte>.Zero) 2340var cmp1 = Vector128.Equals(vector1, v1).AsByte() | Vector128.Equals(vector1, v2).AsByte() | Vector128.Equals(vector1, v3).AsByte(); 2341var cmp2 = Vector128.Equals(vector2, v1).AsByte() | Vector128.Equals(vector2, v2).AsByte() | Vector128.Equals(vector2, v3).AsByte(); 2376Vector128<ushort> vector = Vector128.Create(remaining); 2377Vector128<byte> cmp = Vector128.Equals(vector, v1).AsByte() | Vector128.Equals(vector, v2).AsByte() | Vector128.Equals(vector, v3).AsByte(); 2399Vector128<ushort> vector = Vector128.Create(sourceSpanUInt16.Slice(sourceSpanUInt16.Length - Vector128<ushort>.Count)); 2400Vector128<byte> cmp = Vector128.Equals(vector, v1).AsByte() | Vector128.Equals(vector, v2).AsByte() | Vector128.Equals(vector, v3).AsByte();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (25)
230if (!conversionIsWidthPreserving && !Vector128.IsHardwareAccelerated) 237if (Vector128.IsHardwareAccelerated && elementCount >= numInputElementsToConsumeEachVectorizedLoopIteration) 241Vector128<TFrom> srcVector = Vector128.LoadUnsafe(ref *pSrc); 252Vector128<TFrom> subtractionVector = Vector128.Create(conversionIsToUpper ? (SourceSignedMinValue + TFrom.CreateTruncating('a')) : (SourceSignedMinValue + TFrom.CreateTruncating('A'))); 253Vector128<TFrom> comparisonVector = Vector128.Create(SourceSignedMinValue + TFrom.CreateTruncating(26 /* A..Z or a..z */)); 254Vector128<TFrom> caseConversionVector = Vector128.Create(TFrom.CreateTruncating(0x20)); // works both directions 294srcVector = Vector128.LoadUnsafe(ref *pSrc, i); 347Debug.Assert(Vector128.IsHardwareAccelerated); 349Vector128<ulong> blockAsVectorOfUInt64 = Vector128.CreateScalarUnsafe(nextBlockAsUInt64); 352Vector128.StoreUnsafe(Vector128.WidenLower(blockAsVectorOfUInt64.AsByte()), ref *(ushort*)pDest, i); 357Vector128<uint> narrowedBlock = Vector128.Narrow(blockAsVectorOfUInt16, blockAsVectorOfUInt16).AsUInt32(); 366if (!Vector128.IsHardwareAccelerated) 406Debug.Assert(Vector128.IsHardwareAccelerated); 408Vector128<uint> blockAsVectorOfUInt32 = Vector128.CreateScalarUnsafe(nextBlockAsUInt32); 411Vector128<ulong> widenedBlock = Vector128.WidenLower(blockAsVectorOfUInt32.AsByte()).AsUInt64(); 417Vector128<ushort> narrowedBlock = Vector128.Narrow(blockAsVectorOfUInt16, blockAsVectorOfUInt16).AsUInt16(); 427if (IntPtr.Size < 8 || !Vector128.IsHardwareAccelerated) 475Vector128.StoreUnsafe(vector.As<TFrom, TTo>(), ref *pDest, elementOffset); 487Vector128.StoreUnsafe(Vector128.WidenLower(vector.AsByte()), ref *(ushort*)pDest, elementOffset); 488Vector128.StoreUnsafe(Vector128.WidenUpper(vector.AsByte()), ref *(ushort*)pDest, elementOffset + 8); 510return Vector128.LessThan(left.AsSByte(), right.AsSByte()).As<sbyte, T>(); 514return Vector128.LessThan(left.AsInt16(), right.AsInt16()).As<short, T>();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (16)
52if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 83if (!Vector128.IsHardwareAccelerated && length > 2 * elementsPerUlong) 112Vector128.LoadUnsafe(ref searchSpace) | 113Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector128<T>.Count))); 183Vector128.LoadUnsafe(ref searchSpace) | 184Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<T>.Count) | 185Vector128.LoadUnsafe(ref searchSpace, 2 * (nuint)Vector128<T>.Count) | 186Vector128.LoadUnsafe(ref searchSpace, 3 * (nuint)Vector128<T>.Count))) 207Vector128.LoadUnsafe(ref current) | 208Vector128.LoadUnsafe(ref current, (nuint)Vector128<T>.Count) | 209Vector128.LoadUnsafe(ref current, 2 * (nuint)Vector128<T>.Count) | 210Vector128.LoadUnsafe(ref current, 3 * (nuint)Vector128<T>.Count))) 223Vector128.LoadUnsafe(ref searchSpace) | 224Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<T>.Count) | 225Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, 2 * Vector128<T>.Count)) | 226Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector128<T>.Count)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (19)
52if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TRight>.Count) 140rightValues = Vector128.LoadUnsafe(ref currentRightSearchSpace); 156rightValues = Vector128.LoadUnsafe(ref oneVectorAwayFromRightEnd); 206if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TRight>.Count) 388Vector128<TRight> loweringMask = Vector128.Create(TRight.CreateTruncating(0x20)); 389Vector128<TRight> vecA = Vector128.Create(TRight.CreateTruncating('a')); 390Vector128<TRight> vecZMinusA = Vector128.Create(TRight.CreateTruncating(('z' - 'a'))); 397rightValues = Vector128.LoadUnsafe(ref currentRightSearchSpace); 404Vector128<TRight> notEquals = ~Vector128.Equals(leftValues, rightValues); 413if (Vector128.GreaterThanAny((leftValues - vecA) & notEquals, vecZMinusA) || leftValues != rightValues) 428rightValues = Vector128.LoadUnsafe(ref oneVectorAwayFromRightEnd); 435Vector128<TRight> notEquals = ~Vector128.Equals(leftValues, rightValues); 444if (Vector128.GreaterThanAny((leftValues - vecA) & notEquals, vecZMinusA) || leftValues != rightValues) 468public static Vector128<T> Load128(ref T ptr) => Vector128.LoadUnsafe(ref ptr); 513Vector128<byte> vec = Vector128.CreateScalarUnsafe(Unsafe.ReadUnaligned<long>(ref ptr)).AsByte(); 518Vector128<byte> vec = Vector128.CreateScalarUnsafe(Unsafe.ReadUnaligned<long>(ref ptr)).AsByte(); 524return Vector128.Create(lower, upper); 531(Vector128<ushort> lower, Vector128<ushort> upper) = Vector128.Widen(Vector128.LoadUnsafe(ref ptr));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (56)
216else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<byte>.Count) 218if (!VectorContainsNonAsciiChar(Vector128.Load(pBuffer))) 224byte* pFinalVectorReadPos = pBuffer + bufferLength - Vector128.Size; 225pBuffer = (byte*)(((nuint)pBuffer + Vector128.Size) & ~(nuint)(Vector128.Size - 1)); 229Debug.Assert(0 < numBytesRead && numBytesRead <= Vector128.Size, "We should've made forward progress of at least one byte."); 237Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned."); 238if (VectorContainsNonAsciiChar(Vector128.LoadAligned(pBuffer))) 243pBuffer += Vector128.Size; 377Vector128.Create((ushort)0x1001).AsByte() : 378Vector128.Create((ushort)0x0110).AsByte(); 839else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<ushort>.Count) 841const uint SizeOfVector128InChars = Vector128.Size / sizeof(ushort); // JIT will make this a const 843if (!VectorContainsNonAsciiChar(Vector128.Load((ushort*)pBuffer))) 849pBuffer = (char*)(((nuint)pBuffer + Vector128.Size) & ~(nuint)(Vector128.Size - 1)); 861Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned."); 862if (VectorContainsNonAsciiChar(Vector128.LoadAligned((ushort*)pBuffer))) 972uint SizeOfVector128InChars = Vector128.Size / sizeof(char); 996firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1010if (bufferLength < 2 * Vector128.Size) 1017pBuffer = (char*)(((nuint)pBuffer + Vector128.Size) & ~(nuint)(Vector128.Size - 1)); 1032if (bufferLength >= 2 * Vector128.Size) 1034char* pFinalVectorReadPos = (char*)((nuint)pBuffer + bufferLength - 2 * Vector128.Size); 1040firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1041secondVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer, SizeOfVector128InChars); 1063if ((bufferLength & Vector128.Size) == 0) 1071firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1083if (((byte)bufferLength & (Vector128.Size - 1)) != 0) 1088pBuffer = (char*)((byte*)pBuffer + (bufferLength & (Vector128.Size - 1)) - Vector128.Size); 1089firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1126Vector128<ushort> asciiMaskForAddSaturate = Vector128.Create((ushort)0x7F80); 1153Vector128<ushort> largestAsciiValue = Vector128.Create((ushort)0x007F); 1288Vector128<short> vecWide = Vector128.CreateScalarUnsafe(value).AsInt16(); 1354if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= 2 * (uint)Vector128<byte>.Count) 1535return (asciiVector & Vector128.Create((byte)0x80)) != Vector128<byte>.Zero; 1555Vector128<ushort> zeroIsAscii = utf16Vector & Vector128.Create(asciiMask); 1561Vector128<ushort> asciiMaskForAddSaturate = Vector128.Create((ushort)0x7F80); 1577Vector128<ushort> zeroIsAscii = utf16Vector & Vector128.Create(asciiMask); 1622Sse41.IsSupported ? (vector.AsByte() & Vector128.Create((byte)0x80)) == Vector128<byte>.Zero : 1630(vector.AsUInt16() & Vector128.Create((ushort)0xFF80)) == Vector128<ushort>.Zero; 1691return Vector128.Narrow(vectorFirst, vectorSecond); 1726Debug.Assert(Vector128.IsHardwareAccelerated, "Vector128 is required."); 1732Vector128<ushort> utf16VectorFirst = Vector128.LoadUnsafe(ref utf16Buffer); 1762utf16VectorFirst = Vector128.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 1788utf16VectorFirst = Vector128.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 1789Vector128<ushort> utf16VectorSecond = Vector128.LoadUnsafe(ref utf16Buffer, currentOffsetInElements + SizeOfVector128 / sizeof(short)); 1939Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector128.Size == 0, "Destination should be 128-bit-aligned."); 2078if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= (uint)Vector128<byte>.Count) 2088else if (Vector128.IsHardwareAccelerated && (elementCount - currentOffset) >= (uint)Vector128<byte>.Count) 2267(Vector128<ushort> Lower128, Vector128<ushort> Upper128) = Vector128.Widen((Vector128<byte>)(object)vector); 2289else if (Vector128.IsHardwareAccelerated) 2291Vector128<byte> vecNarrow = Vector128.CreateScalar(value).AsByte(); 2292Vector128<ulong> vecWide = Vector128.WidenLower(vecNarrow).AsUInt64();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (4)
201Vector128<ushort> latin1MaskForTestZ = Vector128.Create((ushort)0xFF00); // used for PTEST on supported hardware 202Vector128<ushort> latin1MaskForAddSaturate = Vector128.Create((ushort)0x7F00); // used for PADDUSW 784Vector128<short> latin1MaskForTestZ = Vector128.Create(unchecked((short)0xFF00)); // used for PTEST on supported hardware 785Vector128<ushort> latin1MaskForAddSaturate = Vector128.Create((ushort)0x7F00); // used for PADDUSW
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (14)
111if (Vector128.IsHardwareAccelerated) 115Vector128<ushort> vector0080 = Vector128.Create<ushort>(0x0080); 116Vector128<ushort> vector0400 = Vector128.Create<ushort>(0x0400); 117Vector128<ushort> vector0800 = Vector128.Create<ushort>(0x0800); 118Vector128<ushort> vectorD800 = Vector128.Create<ushort>(0xD800); 125Vector128<ushort> utf16Data = Vector128.Load((ushort*)pInputBuffer); 158Vector128<ushort> twoOrMoreUtf8Bytes = Vector128.GreaterThanOrEqual(utf16Data, vector0080); 159Vector128<ushort> threeOrMoreUtf8Bytes = Vector128.GreaterThanOrEqual(utf16Data, vector0800); 161popcnt = Vector128.Sum(sumVector); 165Vector128<ushort> vector7800 = Vector128.Create<ushort>(0x7800); 170Vector128<ushort> charIsNonAscii = Vector128.Min(utf16Data, vector0080); 185Vector128<ushort> charIsThreeByteUtf8Encoded = Vector128.AddSaturate(utf16Data, vector7800); 206nuint maskSurr = GetSurrogateMask(Vector128.LessThan(utf16Data, vector0800)); 213nuint maskHigh = GetSurrogateMask(Vector128.LessThan(utf16Data, vector0400));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.cs (11)
263return (vec & Vector128.Create(unchecked((byte)(~0x7F)))) == Vector128<byte>.Zero; 276Vector128<sbyte> lowIndicator1 = Vector128.Create((sbyte)(0x80 - 'A')) + vec1.AsSByte(); 277Vector128<sbyte> lowIndicator2 = Vector128.Create((sbyte)(0x80 - 'A')) + vec2.AsSByte(); 281Vector128.LessThan(Vector128.Create(unchecked((sbyte)(('Z' - 'A') - 0x80))), lowIndicator1); 283Vector128.LessThan(Vector128.Create(unchecked((sbyte)(('Z' - 'A') - 0x80))), lowIndicator2); 287Vector128.AndNot(Vector128.Create((sbyte)0x20), combIndicator1) + vec1.AsSByte(); 289Vector128.AndNot(Vector128.Create((sbyte)0x20), combIndicator2) + vec2.AsSByte();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Transcoding.cs (2)
890nonAsciiUtf16DataMask = Vector128.Create(unchecked((short)0xFF80)); // mask of non-ASCII bits in a UTF-16 char 1019utf16Data = Vector128.CreateScalarUnsafe(possibleNonAsciiQWord).AsInt16();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (3)
133Vector128.Create((ushort)0x1001).AsByte() : 134Vector128.Create((ushort)0x0110).AsByte(); 164uint mask = Vector128.LoadUnsafe(ref *pInputBuffer).ExtractMostSignificantBits();
System.Private.DataContractSerialization (1)
System\Xml\XmlStreamNodeWriter.cs (1)
365if (!Vector128.IsHardwareAccelerated || (uint)charCount < 32)
System.Runtime.Intrinsics (1)
src\runtime\artifacts\obj\System.Runtime.Intrinsics\Release\net11.0\System.Runtime.Intrinsics.Forwards.cs (1)
19[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Intrinsics.Vector128))]
System.Runtime.Numerics (10)
System\Numerics\BigIntegerCalculator.ShiftRot.cs (8)
152if (Vector128.IsHardwareAccelerated) 183while (Vector128.IsHardwareAccelerated && offset >= Vector128<nuint>.Count + 1) 185Vector128<nuint> current = Vector128.LoadUnsafe(ref start, (nuint)(offset - Vector128<nuint>.Count)) << shift; 186Vector128<nuint> carries = Vector128.LoadUnsafe(ref start, (nuint)(offset - (Vector128<nuint>.Count + 1))) >> back; 190Vector128.StoreUnsafe(newValue, ref start, (nuint)(offset - Vector128<nuint>.Count)); 252while (Vector128.IsHardwareAccelerated && remaining.Length >= Vector128<nuint>.Count + 1) 254Vector128<nuint> current = Vector128.Create(remaining) >> shift; 255Vector128<nuint> carries = Vector128.Create(remaining.Slice(1)) << back;
System\Numerics\NumericsHelpers.cs (2)
94while (Vector128.IsHardwareAccelerated && d.Length >= Vector128<nuint>.Count) 96Vector128<nuint> complement = ~Vector128.Create(d);