3092 references to Vector128
http2cat (5)
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());
IIS.FunctionalTests (5)
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());
IIS.LongTests (5)
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());
IIS.NewHandler.FunctionalTests (5)
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());
IIS.NewShim.FunctionalTests (5)
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());
IIS.ShadowCopy.Tests (5)
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());
IISExpress.FunctionalTests (5)
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.HttpSys (5)
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\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\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\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.Shared.Tests (5)
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\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.Collections (26)
System\Collections\BitArray.cs (26)
160else if (Vector128.IsHardwareAccelerated) 164Vector128<byte> lowerVector = Vector128.LoadUnsafe(ref value, i); 165Vector128<byte> lowerIsFalse = Vector128.Equals(lowerVector, Vector128<byte>.Zero); 168Vector128<byte> upperVector = Vector128.LoadUnsafe(ref value, i + (uint)Vector128<byte>.Count); 169Vector128<byte> upperIsFalse = Vector128.Equals(upperVector, Vector128<byte>.Zero); 365else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128<int>.Count) 369Vector128<int> result = Vector128.LoadUnsafe(ref left, i) & Vector128.LoadUnsafe(ref right, i); 438else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128<int>.Count) 442Vector128<int> result = Vector128.LoadUnsafe(ref left, i) | Vector128.LoadUnsafe(ref right, i); 512else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128<int>.Count) 516Vector128<int> result = Vector128.LoadUnsafe(ref left, i) ^ Vector128.LoadUnsafe(ref right, i); 577else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128<int>.Count) 581Vector128<int> result = ~Vector128.LoadUnsafe(ref value, i); 837Vector128<byte> lowerShuffleMask_CopyToBoolArray = Vector128.Create(0, 0x01010101_01010101).AsByte(); 838Vector128<byte> upperShuffleMask_CopyToBoolArray = Vector128.Create(0x02020202_02020202, 0x03030303_03030303).AsByte(); 892Vector128<byte> ones = Vector128.Create((byte)1); 894Vector128.Create(0x80402010_08040201).AsByte() : 895Vector128.Create(0x01020408_10204080).AsByte(); 902Vector128<int> scalar = Vector128.CreateScalarUnsafe(bits); 918Vector128<byte> ones = Vector128.Create((byte)1); 920Vector128.Create(0x80402010_08040201).AsByte() : 921Vector128.Create(0x01020408_10204080).AsByte(); 943Vector128<byte> vector = Vector128.Create(bits).AsByte();
System.IO.Hashing (96)
System\IO\Hashing\Crc32.Vectorized.cs (19)
47x1 = Vector128.LoadUnsafe(ref srcRef).AsUInt64(); 48x2 = Vector128.LoadUnsafe(ref srcRef, 16).AsUInt64(); 49Vector128<ulong> x3 = Vector128.LoadUnsafe(ref srcRef, 32).AsUInt64(); 50Vector128<ulong> x4 = Vector128.LoadUnsafe(ref srcRef, 48).AsUInt64(); 56x1 ^= Vector128.CreateScalar(crc).AsUInt64(); 58kConstants = Vector128.Create(0x0154442bd4UL, 0x01c6e41596UL); // k1, k2 63Vector128<ulong> y5 = Vector128.LoadUnsafe(ref srcRef).AsUInt64(); 64Vector128<ulong> y6 = Vector128.LoadUnsafe(ref srcRef, 16).AsUInt64(); 65Vector128<ulong> y7 = Vector128.LoadUnsafe(ref srcRef, 32).AsUInt64(); 66Vector128<ulong> y8 = Vector128.LoadUnsafe(ref srcRef, 48).AsUInt64(); 78kConstants = Vector128.Create(0x01751997d0UL, 0x00ccaa009eUL); // k3, k4 88x1 = Vector128.LoadUnsafe(ref srcRef).AsUInt64(); 89x1 ^= Vector128.CreateScalar(crc).AsUInt64(); 98x1 = FoldPolynomialPair(Vector128.LoadUnsafe(ref srcRef).AsUInt64(), x1, 99Vector128.Create(0x01751997d0UL, 0x00ccaa009eUL)); 106Vector128<ulong> bitmask = Vector128.Create(~0, 0, ~0, 0).AsUInt64(); 108CarrylessMultiplyLower(x1, Vector128.CreateScalar(0x00ccaa009eUL)); 109x1 = CarrylessMultiplyLower(x1 & bitmask, Vector128.CreateScalar(0x0163cd6124UL)) ^ // k5, k0 113kConstants = Vector128.Create(0x01db710641UL, 0x01f7011641UL); // polynomial
System\IO\Hashing\Crc64.Vectorized.cs (17)
17Vector128<byte> vector = Vector128.LoadUnsafe(ref source, elementOffset); 26vector = Vector128.Shuffle(vector, 27Vector128.Create((byte)0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 76x0 ^= ShiftLowerToUpper(Vector128.CreateScalar(crc)); 78kConstants = Vector128.Create(0x5cf79dea9ac37d6UL, 0x001067e571d7d5c2UL); // k3, k4 108x7 = FoldPolynomialPair(x7, x0, Vector128.Create(0xe464f4df5fb60ac1UL, 0xb649c5b35a759cf2UL)); // k9, k10 109x7 = FoldPolynomialPair(x7, x1, Vector128.Create(0x9af04e1eff82d0ddUL, 0x6e82e609297f8fe8UL)); // k11, k12 110x7 = FoldPolynomialPair(x7, x2, Vector128.Create(0x97c516e98bd2e73UL, 0xb76477b31e22e7bUL)); // k13, k14 111x7 = FoldPolynomialPair(x7, x3, Vector128.Create(0x5f6843ca540df020UL, 0xddf4b6981205b83fUL)); // k15, k16 112x7 = FoldPolynomialPair(x7, x4, Vector128.Create(0x54819d8713758b2cUL, 0x4a6b90073eb0af5aUL)); // k17, k18 113x7 = FoldPolynomialPair(x7, x5, Vector128.Create(0x571bee0a227ef92bUL, 0x44bef2a201b5200cUL)); // k19, k20 114x7 = FoldPolynomialPair(x7, x6, Vector128.Create(0x5f5c3c7eb52fab6UL, 0x4eb938a7d257740eUL)); // k1, k2 126x7 ^= ShiftLowerToUpper(Vector128.CreateScalar(crc)); 136Vector128.Create(0x5f5c3c7eb52fab6UL, 0x4eb938a7d257740eUL)); // k1, k2 143x7 = CarrylessMultiplyLeftUpperRightLower(x7, Vector128.CreateScalar(0x5f5c3c7eb52fab6UL)) ^ // k5 147kConstants = Vector128.Create(0x578d29d06cc4f872UL, 0x42f0e1eba9ea3693UL); // k7, k8 149x7 = CarrylessMultiplyLeftUpperRightLower(x7, kConstants) ^ (x7 & Vector128.Create(0UL, ~0UL));
System\IO\Hashing\XxHashShared.cs (60)
342else if (Vector128.IsHardwareAccelerated) 344Vector128.Store(Vector128.Load(stateAccumulators), accumulators); 345Vector128.Store(Vector128.Load(stateAccumulators + 2), accumulators + 2); 346Vector128.Store(Vector128.Load(stateAccumulators + 4), accumulators + 4); 347Vector128.Store(Vector128.Load(stateAccumulators + 6), accumulators + 6); 399else if (Vector128.IsHardwareAccelerated) 401Vector128.Store(Vector128.Create(Prime32_3, Prime64_1), accumulators); 402Vector128.Store(Vector128.Create(Prime64_2, Prime64_3), accumulators + 2); 403Vector128.Store(Vector128.Create(Prime64_4, Prime32_2), accumulators + 4); 404Vector128.Store(Vector128.Create(Prime64_5, Prime32_1), accumulators + 6); 491else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 493Vector128<ulong> seedVec = Vector128.Create(seed, 0u - seed); 496Vector128.Store(Vector128.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 550else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 552Vector128<ulong> acc1 = Vector128.Load(accumulators); 553Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.Count); 554Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.Count * 2); 555Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.Count * 3); 562Vector128<uint> secretVal = Vector128.Load((uint*)secret); 566secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count); 570secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 2); 574secretVal = Vector128.Load((uint*)secret + Vector128<uint>.Count * 3); 583acc1 = ScrambleAccumulator128(acc1, Vector128.Load((ulong*)secretForScramble)); 584acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count)); 585acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 2)); 586acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.Count * 3)); 590Vector128.Store(acc1, accumulators); 591Vector128.Store(acc2, accumulators + Vector128<ulong>.Count); 592Vector128.Store(acc3, accumulators + Vector128<ulong>.Count * 2); 593Vector128.Store(acc4, accumulators + Vector128<ulong>.Count * 3); 636else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 640Vector128<ulong> accVec = Accumulate128(Vector128.Load(accumulators), source, Vector128.Load((uint*)secret)); 641Vector128.Store(accVec, accumulators); 684Vector128<uint> sourceVec = Vector128.Load((uint*)source); 688Vector128<uint> sourceSwap = Vector128.Shuffle(sourceVec, Vector128.Create(2u, 3, 0, 1)); 701Vector64<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(0u, 2, 0, 0)).GetLower(); 702Vector64<uint> sourceHigh = Vector128.Shuffle(source, Vector128.Create(1u, 3, 0, 0)).GetLower(); 707Vector128<uint> sourceLow = Vector128.Shuffle(source, Vector128.Create(1u, 0, 3, 0)); 710(source & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceLow & Vector128.Create(~0u, 0u, ~0u, 0u)).AsUInt64(); 729else if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 733Vector128<ulong> accVec = ScrambleAccumulator128(Vector128.Load(accumulators), Vector128.Load((ulong*)secret)); 734Vector128.Store(accVec, accumulators); 768Vector128<ulong> xorShift = accVec ^ Vector128.ShiftRightLogical(accVec, 47); 770accVec = xorWithKey * Vector128.Create((ulong)Prime32_1);
System.Linq (6)
System\Linq\Max.cs (1)
19public static Vector128<T> Compare(Vector128<T> left, Vector128<T> right) => Vector128.Max(left, right);
System\Linq\MaxMin.cs (4)
40if (!Vector128.IsHardwareAccelerated || !Vector128<T>.IsSupported || span.Length < Vector128<T>.Count) 56Vector128<T> best = Vector128.LoadUnsafe(ref current); 61best = TMinMax.Compare(best, Vector128.LoadUnsafe(ref current)); 64best = TMinMax.Compare(best, Vector128.LoadUnsafe(ref lastVectorStart));
System\Linq\Min.cs (1)
19public static Vector128<T> Compare(Vector128<T> left, Vector128<T> right) => Vector128.Min(left, right);
System.Net.Primitives (4)
System\Net\IPAddress.cs (4)
204if (Vector128.IsHardwareAccelerated && BitConverter.IsLittleEndian) 206Vector128<ushort> ushorts = Vector128.Create(address).AsUInt16(); 359if (Vector128.IsHardwareAccelerated) 361Vector128<ushort> ushorts = Vector128.Create(numbers).AsUInt16();
System.Numerics.Tensors (1101)
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)
41public static bool ShouldEarlyExit(Vector128<T> result) => Vector128.AnyWhereAllBitsSet(result); 69typeof(T) == typeof(float) ? Vector128.EqualsAny(result.AsUInt32(), Vector128<uint>.Zero) : 70typeof(T) == typeof(double) ? Vector128.EqualsAny(result.AsUInt64(), Vector128<ulong>.Zero) : 71Vector128.EqualsAny(result, Vector128<T>.Zero); 157if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 165if (TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)))) 176TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count))))) 297if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 321Vector128<byte> v = TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsByte(); 411if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 436Vector128.Narrow( 437TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsUInt16(), 438TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt16()); 536if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 561Vector128.Narrow( 562Vector128.Narrow( 563TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsUInt32(), 564TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt32()), 565Vector128.Narrow( 566TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt32(), 567TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt32())); 683if (Vector128.IsHardwareAccelerated && TOperator.Vectorizable && Vector128<T>.IsSupported) 710Vector128.Narrow( 711Vector128.Narrow( 712Vector128.Narrow( 713TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsUInt64(), 714TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt64()), 715Vector128.Narrow( 716TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.Count)))).AsUInt64(), 717TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.Count)))).AsUInt64())), 718Vector128.Narrow( 719Vector128.Narrow( 720TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (4 * Vector128<T>.Count)))).AsUInt64(), 721TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (5 * Vector128<T>.Count)))).AsUInt64()), 722Vector128.Narrow( 723TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (6 * Vector128<T>.Count)))).AsUInt64(), 724TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (7 * Vector128<T>.Count)))).AsUInt64())));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfOperator.cs (44)
30tmpResult = Vector128.Shuffle(result.AsInt64(), Vector128.Create(1, 0)).As<long, T>(); 31tmpIndex = Vector128.Shuffle(resultIndex.AsInt64(), Vector128.Create(1, 0)).As<long, T>(); 41tmpResult = Vector128.Shuffle(result.AsInt32(), Vector128.Create(2, 3, 0, 1)).As<int, T>(); 42tmpIndex = Vector128.Shuffle(resultIndex.AsInt32(), Vector128.Create(2, 3, 0, 1)).As<int, T>(); 46tmpResult = Vector128.Shuffle(result.AsInt32(), Vector128.Create(1, 0, 3, 2)).As<int, T>(); 47tmpIndex = Vector128.Shuffle(resultIndex.AsInt32(), Vector128.Create(1, 0, 3, 2)).As<int, T>(); 57tmpResult = Vector128.Shuffle(result.AsInt16(), Vector128.Create(4, 5, 6, 7, 0, 1, 2, 3)).As<short, T>(); 58tmpIndex = Vector128.Shuffle(resultIndex.AsInt16(), Vector128.Create(4, 5, 6, 7, 0, 1, 2, 3)).As<short, T>(); 62tmpResult = Vector128.Shuffle(result.AsInt16(), Vector128.Create(2, 3, 0, 1, 4, 5, 6, 7)).As<short, T>(); 63tmpIndex = Vector128.Shuffle(resultIndex.AsInt16(), Vector128.Create(2, 3, 0, 1, 4, 5, 6, 7)).As<short, T>(); 67tmpResult = Vector128.Shuffle(result.AsInt16(), Vector128.Create(1, 0, 2, 3, 4, 5, 6, 7)).As<short, T>(); 68tmpIndex = Vector128.Shuffle(resultIndex.AsInt16(), Vector128.Create(1, 0, 2, 3, 4, 5, 6, 7)).As<short, T>(); 78tmpResult = Vector128.Shuffle(result.AsByte(), Vector128.Create((byte)8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7)).As<byte, T>(); 79tmpIndex = Vector128.Shuffle(resultIndex.AsByte(), Vector128.Create((byte)8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7)).As<byte, T>(); 83tmpResult = Vector128.Shuffle(result.AsByte(), Vector128.Create((byte)4, 5, 6, 7, 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>(); 84tmpIndex = Vector128.Shuffle(resultIndex.AsByte(), Vector128.Create((byte)4, 5, 6, 7, 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>(); 88tmpResult = Vector128.Shuffle(result.AsByte(), Vector128.Create((byte)2, 3, 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>(); 89tmpIndex = Vector128.Shuffle(resultIndex.AsByte(), Vector128.Create((byte)2, 3, 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>(); 93tmpResult = Vector128.Shuffle(result.AsByte(), Vector128.Create((byte)1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>(); 94tmpIndex = Vector128.Shuffle(resultIndex.AsByte(), Vector128.Create((byte)1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)).As<byte, T>(); 127sizeof(T) == sizeof(long) ? Vector128.LessThan(indices1.AsInt64(), indices2.AsInt64()).As<long, T>() : 128sizeof(T) == sizeof(int) ? Vector128.LessThan(indices1.AsInt32(), indices2.AsInt32()).As<int, T>() : 129sizeof(T) == sizeof(short) ? Vector128.LessThan(indices1.AsInt16(), indices2.AsInt16()).As<short, T>() : 130Vector128.LessThan(indices1.AsByte(), indices2.AsByte()).As<byte, T>();
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)
106if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported) 146Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 147Vector128.LoadUnsafe(ref yRef), 148Vector128.LoadUnsafe(ref zRef)); 149Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 150Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 151Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 208vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 209Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 210Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 0))); 211vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 212Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 213Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 1))); 214vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 215Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 216Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 2))); 217vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 218Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 219Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 3))); 228vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 229Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 230Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 4))); 231vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 232Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 233Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 5))); 234vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 235Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 236Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 6))); 237vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 238Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 239Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 7))); 263vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 264Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 265Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 0))); 266vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 267Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 268Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 1))); 269vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 270Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 271Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 2))); 272vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 273Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 274Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 3))); 283vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 284Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 285Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 4))); 286vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 287Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 288Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 5))); 289vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 290Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 291Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 6))); 292vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 293Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 294Vector128.Load(zPtr + (uint)(Vector128<T>.Count * 7))); 336Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 337Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8)), 338Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 8))); 345Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 346Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7)), 347Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 7))); 354Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 355Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6)), 356Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 6))); 363Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 364Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5)), 365Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 5))); 372Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 373Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4)), 374Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 4))); 381Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 382Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3)), 383Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 3))); 390Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 391Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2)), 392Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.Count * 2))); 1066Debug.Assert(Vector128.IsHardwareAccelerated); 1068Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1069Vector128.LoadUnsafe(ref yRef), 1070Vector128.LoadUnsafe(ref zRef)); 1071Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1072Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1073Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1084Debug.Assert(Vector128.IsHardwareAccelerated); 1086Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1087Vector128.LoadUnsafe(ref yRef), 1088Vector128.LoadUnsafe(ref zRef)); 1250Debug.Assert(Vector128.IsHardwareAccelerated); 1252Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1253Vector128.LoadUnsafe(ref yRef), 1254Vector128.LoadUnsafe(ref zRef)); 1255Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1256Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1257Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1268Debug.Assert(Vector128.IsHardwareAccelerated); 1270Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1271Vector128.LoadUnsafe(ref yRef), 1272Vector128.LoadUnsafe(ref zRef)); 1371Debug.Assert(Vector128.IsHardwareAccelerated); 1373Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1374Vector128.LoadUnsafe(ref yRef), 1375Vector128.LoadUnsafe(ref zRef)); 1376Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1377Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1378Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1388Debug.Assert(Vector128.IsHardwareAccelerated); 1390Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1391Vector128.LoadUnsafe(ref yRef), 1392Vector128.LoadUnsafe(ref zRef)); 1467Debug.Assert(Vector128.IsHardwareAccelerated); 1469Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1470Vector128.LoadUnsafe(ref yRef), 1471Vector128.LoadUnsafe(ref zRef)); 1472Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1473Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1474Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.Count)); 1484Debug.Assert(Vector128.IsHardwareAccelerated); 1486Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1487Vector128.LoadUnsafe(ref yRef), 1488Vector128.LoadUnsafe(ref zRef)); 1581if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported) 1621Vector128<T> zVec = Vector128.Create(z); 1623Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 1624Vector128.LoadUnsafe(ref yRef), 1626Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 1627Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 1682vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1683Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 1685vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1686Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 1688vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1689Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 1691vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1692Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 1702vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1703Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 1705vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1706Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 1708vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1709Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 1711vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1712Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 1736vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 1737Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 0)), 1739vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 1740Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 1)), 1742vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 1743Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 2)), 1745vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 1746Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 3)), 1756vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 1757Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 4)), 1759vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 1760Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 5)), 1762vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 1763Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 6)), 1765vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 1766Vector128.Load(yPtr + (uint)(Vector128<T>.Count * 7)), 1807Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 1808Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 8)), 1816Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 1817Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 7)), 1825Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 1826Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 6)), 1834Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 1835Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 5)), 1843Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 1844Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 4)), 1852Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 1853Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 3)), 1861Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 1862Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.Count * 2)), 2531Debug.Assert(Vector128.IsHardwareAccelerated); 2533Vector128<T> zVec = Vector128.Create(z); 2535Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2536Vector128.LoadUnsafe(ref yRef), 2538Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2539Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2551Debug.Assert(Vector128.IsHardwareAccelerated); 2553Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2554Vector128.LoadUnsafe(ref yRef), 2555Vector128.Create(z)); 2719Debug.Assert(Vector128.IsHardwareAccelerated); 2721Vector128<T> zVec = Vector128.Create(z); 2723Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2724Vector128.LoadUnsafe(ref yRef), 2726Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2727Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2739Debug.Assert(Vector128.IsHardwareAccelerated); 2741Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2742Vector128.LoadUnsafe(ref yRef), 2743Vector128.Create(z)); 2844Debug.Assert(Vector128.IsHardwareAccelerated); 2846Vector128<T> zVec = Vector128.Create(z); 2848Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2849Vector128.LoadUnsafe(ref yRef), 2851Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2852Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2863Debug.Assert(Vector128.IsHardwareAccelerated); 2865Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2866Vector128.LoadUnsafe(ref yRef), 2867Vector128.Create(z)); 2944Debug.Assert(Vector128.IsHardwareAccelerated); 2946Vector128<T> zVec = Vector128.Create(z); 2948Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2949Vector128.LoadUnsafe(ref yRef), 2951Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 2952Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.Count), 2963Debug.Assert(Vector128.IsHardwareAccelerated); 2965Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 2966Vector128.LoadUnsafe(ref yRef), 2967Vector128.Create(z)); 3067if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported) 3107Vector128<T> yVec = Vector128.Create(y); 3108Vector128<T> zVec = Vector128.Create(z); 3110Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 3113Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 3166vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 3169vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 3172vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 3175vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 3186vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 3189vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 3192vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 3195vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 3219vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 0)), 3222vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 1)), 3225vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 2)), 3228vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 3)), 3239vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 4)), 3242vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 5)), 3245vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 6)), 3248vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.Count * 7)), 3288Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 8)), 3297Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 7)), 3306Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 6)), 3315Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 5)), 3324Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 4)), 3333Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 3)), 3342Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.Count * 2)), 4003Debug.Assert(Vector128.IsHardwareAccelerated); 4005Vector128<T> yVec = Vector128.Create(y); 4006Vector128<T> zVec = Vector128.Create(z); 4008Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4011Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4024Debug.Assert(Vector128.IsHardwareAccelerated); 4026Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4027Vector128.Create(y), 4028Vector128.Create(z)); 4193Debug.Assert(Vector128.IsHardwareAccelerated); 4195Vector128<T> yVec = Vector128.Create(y); 4196Vector128<T> zVec = Vector128.Create(z); 4198Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4201Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4214Debug.Assert(Vector128.IsHardwareAccelerated); 4216Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4217Vector128.Create(y), 4218Vector128.Create(z)); 4320Debug.Assert(Vector128.IsHardwareAccelerated); 4322Vector128<T> yVec = Vector128.Create(y); 4323Vector128<T> zVec = Vector128.Create(z); 4325Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4328Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4340Debug.Assert(Vector128.IsHardwareAccelerated); 4342Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4343Vector128.Create(y), 4344Vector128.Create(z)); 4422Debug.Assert(Vector128.IsHardwareAccelerated); 4424Vector128<T> yVec = Vector128.Create(y); 4425Vector128<T> zVec = Vector128.Create(z); 4427Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4430Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.Count), 4442Debug.Assert(Vector128.IsHardwareAccelerated); 4444Vector128<T> beg = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef), 4445Vector128.Create(y), 4446Vector128.Create(z));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (30)
131if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TUnaryOperator.Vectorizable) 139(Vector128<T> first, Vector128<T> second) = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i)); 152(Vector128<T> first, Vector128<T> second) = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref sourceRef, (uint)i)); 302if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TOperator.Vectorizable) 310(Vector128<T> first, Vector128<T> second) = TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), Vector128.LoadUnsafe(ref yRef, (uint)i)); 321Vector128<T> mask = Vector128.Equals(CreateRemainderMaskVector128<T>(x.Length - i), Vector128<T>.Zero); 325Vector128<T> first = Vector128.ConditionalSelect(mask, 326Vector128.Create(TOperator.RemainderMaskValue), 327Vector128.LoadUnsafe(ref xRef, (uint)i)); 329Vector128<T> second = Vector128.ConditionalSelect(mask, 330Vector128.Create(TOperator.RemainderMaskValue), 331Vector128.LoadUnsafe(ref yRef, (uint)i)); 335Vector128.ConditionalSelect(mask, 336Vector128.LoadUnsafe(ref destination1Ref, (uint)i), 340Vector128.ConditionalSelect(mask, 341Vector128.LoadUnsafe(ref destination2Ref, (uint)i), 487if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && TOperator.Vectorizable) 492Vector128<T> yVec = Vector128.Create(y); 497(Vector128<T> first, Vector128<T> second) = TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), yVec); 508Vector128<T> mask = Vector128.Equals(CreateRemainderMaskVector128<T>(x.Length - i), Vector128<T>.Zero); 512Vector128<T> first = Vector128.ConditionalSelect(mask, 513Vector128.Create(TOperator.RemainderMaskValue), 514Vector128.LoadUnsafe(ref xRef, (uint)i)); 516Vector128<T> second = Vector128.ConditionalSelect(mask, 517Vector128.Create(TOperator.RemainderMaskValue), 522Vector128.ConditionalSelect(mask, 523Vector128.LoadUnsafe(ref destination1Ref, (uint)i), 527Vector128.ConditionalSelect(mask, 528Vector128.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)
52Vector128<T> abs = Vector128.ConditionalSelect(Vector128.LessThan(x, Vector128<T>.Zero), -x, x); 53if (Vector128.LessThan(abs, Vector128<T>.Zero) != Vector128<T>.Zero) 59return 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)
58public static T Invoke(Vector128<T> x) => Vector128.Sum(x);
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.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)
35return Vector128.Ceiling(x.AsSingle()).As<float, T>(); 40return Vector128.Ceiling(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Clamp.cs (3)
178public static Vector128<T> Invoke(Vector128<T> x, Vector128<T> min, Vector128<T> max) => Vector128.Clamp(x, min, max); 226public static Vector128<T> Invoke(Vector128<T> min, Vector128<T> max, Vector128<T> x) => Vector128.Clamp(x, min, max); 275public 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)
170public static Vector128<float> Invoke(Vector128<int> x) => Vector128.ConvertToSingle(x); 181public static Vector128<float> Invoke(Vector128<uint> x) => Vector128.ConvertToSingle(x); 192public static Vector128<double> Invoke(Vector128<ulong> x) => Vector128.ConvertToDouble(x); 203public static Vector128<double> Invoke(Vector128<long> x) => Vector128.ConvertToDouble(x); 214public static (Vector128<double> Lower, Vector128<double> Upper) Invoke(Vector128<float> x) => Vector128.Widen(x); 225public static Vector128<float> Invoke(Vector128<double> lower, Vector128<double> upper) => Vector128.Narrow(lower, upper); 236public static (Vector128<ushort> Lower, Vector128<ushort> Upper) Invoke(Vector128<byte> x) => Vector128.Widen(x); 251(Vector128<ushort> Lower, Vector128<ushort> Upper) ushorts = Vector128.Widen(x); 252(Vector128<uint> Lower, Vector128<uint> Upper) uintsLower = Vector128.Widen(ushorts.Lower); 253(Vector128<uint> Lower, Vector128<uint> Upper) uintsUpper = Vector128.Widen(ushorts.Upper); 288Vector128.ConvertToSingle(results.Item1), 289Vector128.ConvertToSingle(results.Item2), 290Vector128.ConvertToSingle(results.Item3), 291Vector128.ConvertToSingle(results.Item4) 326public static (Vector128<short> Lower, Vector128<short> Upper) Invoke(Vector128<sbyte> x) => Vector128.Widen(x); 337public static (Vector128<uint> Lower, Vector128<uint> Upper) Invoke(Vector128<ushort> x) => Vector128.Widen(x); 348public static (Vector128<int> Lower, Vector128<int> Upper) Invoke(Vector128<short> x) => Vector128.Widen(x); 359public static (Vector128<ulong> Lower, Vector128<ulong> Upper) Invoke(Vector128<uint> x) => Vector128.Widen(x); 370public static (Vector128<long> Lower, Vector128<long> Upper) Invoke(Vector128<int> x) => Vector128.Widen(x); 396(Vector128<int> lowerInt32, Vector128<int> upperInt32) = Vector128.Widen(x); 404Vector128<uint> sign = value & Vector128.Create(SingleSignMask); 410Vector128<uint> offsetExponent = bitValueInProcess & Vector128.Create(HalfExponentMask); 413Vector128<uint> subnormalMask = Vector128.Equals(offsetExponent, Vector128<uint>.Zero); 416Vector128<uint> infinityOrNaNMask = Vector128.Equals(offsetExponent, Vector128.Create(HalfExponentMask)); 419Vector128<uint> maskedExponentLowerBound = subnormalMask & Vector128.Create(ExponentLowerBound); 422Vector128<uint> offsetMaskedExponentLowerBound = Vector128.Create(ExponentOffset) | maskedExponentLowerBound; 425bitValueInProcess = Vector128.ShiftLeft(bitValueInProcess, 13); 428offsetMaskedExponentLowerBound = Vector128.ConditionalSelect(Vector128.Equals(infinityOrNaNMask, Vector128<uint>.Zero), 430Vector128.ShiftLeft(offsetMaskedExponentLowerBound, 1)); 433bitValueInProcess &= Vector128.Create(HalfToSingleBitsMask); 577return Vector128.Narrow( 586Vector128<uint> sign = Vector128.ShiftRightLogical(bitValue & Vector128.Create(SingleSignMask), 16); 589Vector128<uint> realMask = Vector128.Equals(value, value).AsUInt32(); 592value = Vector128.Abs(value); 595value = Vector128.Min(Vector128.Create(MaxHalfValueBelowInfinity), value); 598Vector128<uint> exponentOffset0 = Vector128.Max(value, Vector128.Create(MinExp).AsSingle()).AsUInt32(); 601exponentOffset0 &= Vector128.Create(SingleBiasedExponentMask); 604exponentOffset0 += Vector128.Create(Exponent13); 611Vector128<uint> maskedHalfExponentForNaN = ~realMask & Vector128.Create(ExponentMask); 614bitValue -= Vector128.Create(Exponent126); 617Vector128<uint> newExponent = Vector128.ShiftRightLogical(bitValue, 13);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (4)
44if (typeof(TTo) == typeof(int)) return Vector128.ConvertToInt32(x.AsSingle()).As<int, TTo>(); 45if (typeof(TTo) == typeof(uint)) return Vector128.ConvertToUInt32(x.AsSingle()).As<uint, TTo>(); 50if (typeof(TTo) == typeof(long)) return Vector128.ConvertToInt64(x.AsDouble()).As<long, TTo>(); 51if (typeof(TTo) == typeof(ulong)) return Vector128.ConvertToUInt64(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (4)
44if (typeof(TTo) == typeof(int)) return Vector128.ConvertToInt32Native(x.AsSingle()).As<int, TTo>(); 45if (typeof(TTo) == typeof(uint)) return Vector128.ConvertToUInt32Native(x.AsSingle()).As<uint, TTo>(); 50if (typeof(TTo) == typeof(long)) return Vector128.ConvertToInt64Native(x.AsDouble()).As<long, TTo>(); 51if (typeof(TTo) == typeof(ulong)) return Vector128.ConvertToUInt64Native(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (10)
109public static Vector128<int> Invoke(Vector128<float> x) => Vector128.ConvertToInt32(x); 120public static Vector128<uint> Invoke(Vector128<float> x) => Vector128.ConvertToUInt32(x); 131public static Vector128<ulong> Invoke(Vector128<double> x) => Vector128.ConvertToUInt64(x); 142public static Vector128<long> Invoke(Vector128<double> x) => Vector128.ConvertToInt64(x); 153public static Vector128<byte> Invoke(Vector128<ushort> lower, Vector128<ushort> upper) => Vector128.Narrow(lower, upper); 164public static Vector128<sbyte> Invoke(Vector128<short> lower, Vector128<short> upper) => Vector128.Narrow(lower, upper); 175public static Vector128<ushort> Invoke(Vector128<uint> lower, Vector128<uint> upper) => Vector128.Narrow(lower, upper); 186public static Vector128<short> Invoke(Vector128<int> lower, Vector128<int> upper) => Vector128.Narrow(lower, upper); 197public static Vector128<uint> Invoke(Vector128<ulong> lower, Vector128<ulong> upper) => Vector128.Narrow(lower, upper); 208public static Vector128<int> Invoke(Vector128<long> lower, Vector128<long> upper) => Vector128.Narrow(lower, upper);
System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs (1)
51return Vector128.CopySign(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (2)
73return Vector128.Cos(x.AsDouble()).As<double, T>(); 78return Vector128.Cos(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (8)
79Vector128<float> y = Vector128.Abs(x); 80Vector128<float> z = ExpOperator<float>.Invoke(y - Vector128.Create((float)Single_LOGV)); 81return (Vector128.Create((float)Single_HALFV) * (z + (Vector128.Create((float)Single_INVV2) / z))).As<float, T>(); 88Vector128<double> y = Vector128.Abs(x); 89Vector128<double> z = ExpOperator<double>.Invoke(y - Vector128.Create(Double_LOGV)); 90return (Vector128.Create(Double_HALFV) * (z + (Vector128.Create(Double_INVV2) / z))).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (8)
144if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 158Vector128<T> xVec = Vector128.LoadUnsafe(ref xRef, (uint)i); 159Vector128<T> yVec = Vector128.LoadUnsafe(ref yRef, (uint)i); 172Vector128<T> xVec = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count)); 173Vector128<T> yVec = Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<T>.Count)); 186Vector128.Sum(dotProductVector) / 187(T.Sqrt(Vector128.Sum(xSumOfSquaresVector)) * T.Sqrt(Vector128.Sum(ySumOfSquaresVector)));
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (7)
43Vector128<T> xpi = x * Vector128.Create(T.Pi); 47if (Vector128.GreaterThanAny(xpi.AsUInt32() & Vector128.Create(CosOperatorSingle.SignMask), Vector128.Create(CosOperatorSingle.MaxVectorizedValue))) 55if (Vector128.GreaterThanAny(xpi.AsUInt64() & Vector128.Create(CosOperatorDouble.SignMask), Vector128.Create(CosOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (2)
37return Vector128.DegreesToRadians(x.AsDouble()).As<double, T>(); 42return Vector128.DegreesToRadians(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (2)
47return Vector128.Exp(x.AsDouble()).As<double, T>(); 52return Vector128.Exp(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs (1)
37public static Vector128<T> Invoke(Vector128<T> x) => ExpOperator<T>.Invoke(x * Vector128.Create(T.CreateTruncating(NaturalLog10)));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs (1)
37public 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)
35return Vector128.Floor(x.AsSingle()).As<float, T>(); 40return Vector128.Floor(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (2)
106return Vector128.FusedMultiplyAdd(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 111return Vector128.FusedMultiplyAdd(x.AsSingle(), y.AsSingle(), z.AsSingle()).As<float, T>();
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)
41return Vector128.Hypot(x.AsDouble(), y.AsDouble()).As<double, T>(); 46return Vector128.Hypot(x.AsSingle(), y.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (15)
37Vector128<T> useResult = Vector128.GreaterThan(result, current); 38Vector128<T> equalMask = Vector128.Equals(result, current); 47Vector128<T> sameSign = Vector128.Equals(IsNegative(result).AsInt32(), currentNegative.AsInt32()).As<int, T>(); 330if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 336sizeof(T) == sizeof(long) ? Vector128.Create((long)i).As<long, T>() : 337sizeof(T) == sizeof(int) ? Vector128.Create(i).As<int, T>() : 338sizeof(T) == sizeof(short) ? Vector128.Create((short)i).As<short, T>() : 339Vector128.Create((byte)i).As<byte, T>(); 359Vector128<T> result = Vector128.LoadUnsafe(ref xRef); 365nanMask = ~Vector128.Equals(result, result); 379current = Vector128.LoadUnsafe(ref xRef, (uint)i); 384nanMask = ~Vector128.Equals(current, current); 399current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count)); 404nanMask = ~Vector128.Equals(current, current); 483return Vector128.ConditionalSelect(mask, left, right);
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMaxMagnitude.cs (5)
34Vector128<T> resultMag = Vector128.Abs(result), currentMag = Vector128.Abs(current); 35Vector128<T> useResult = Vector128.GreaterThan(resultMag, currentMag); 36Vector128<T> equalMask = Vector128.Equals(resultMag, currentMag); 45Vector128<T> sameSign = Vector128.Equals(IsNegative(result).AsInt32(), currentNegative.AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMin.cs (3)
34Vector128<T> useResult = Vector128.LessThan(result, current); 35Vector128<T> equalMask = Vector128.Equals(result, current); 44Vector128<T> sameSign = Vector128.Equals(resultNegative.AsInt32(), IsNegative(current).AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMinMagnitude.cs (5)
34Vector128<T> resultMag = Vector128.Abs(result), currentMag = Vector128.Abs(current); 35Vector128<T> useResult = Vector128.LessThan(resultMag, currentMag); 36Vector128<T> equalMask = Vector128.Equals(resultMag, currentMag); 45Vector128<T> sameSign = Vector128.Equals(resultNegative.AsInt32(), IsNegative(current).AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IsEvenInteger.cs (1)
57public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsEvenInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsFinite.cs (1)
75public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsFinite(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInfinity.cs (1)
62public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInteger.cs (1)
72public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNegativeInfinity.cs (1)
62public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsNegativeInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNormal.cs (1)
56public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsNormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsOddInteger.cs (1)
57public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsOddInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPositiveInfinity.cs (1)
62public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsPositiveInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPow2.cs (2)
58Vector128.Equals(x & (x - Vector128<T>.One), Vector128<T>.Zero) & 59Vector128.GreaterThan(x, Vector128<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.IsSubnormal.cs (1)
62public static Vector128<T> Invoke(Vector128<T> x) => Vector128.IsSubnormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsZero.cs (1)
53public static Vector128<T> Invoke(Vector128<T> x) => Vector128.Equals(x, Vector128<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (5)
43Vector128<byte> lookupVectorLow = Vector128.Create((byte)8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4); 44Vector128<byte> lookupVectorHigh = Vector128.Create((byte)3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); 45Vector128<byte> nibbleMask = Vector128.Create<byte>(0xF); 46Vector128<byte> permuteMask = Vector128.Create<byte>(0x80); 60Vector128<uint> lowHalf = Vector128.Create((uint)0x0000FFFF);
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (2)
85return Vector128.Lerp(x.AsDouble(), y.AsDouble(), amount.AsDouble()).As<double, T>(); 90return Vector128.Lerp(x.AsSingle(), y.AsSingle(), amount.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (2)
89return Vector128.Log(x.AsDouble()).As<double, T>(); 94return Vector128.Log(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (1)
41public static Vector128<T> Invoke(Vector128<T> x) => LogOperator<T>.Invoke(x) / Vector128.Create(T.CreateTruncating(NaturalLog10));
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (2)
49return Vector128.Log2(x.AsDouble()).As<double, T>(); 54return Vector128.Log2(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (8)
103return Vector128.Max(x, y); 150return Vector128.IsNaN(vector); 195return Vector128.IsNegative(vector); 285return Vector128.IsPositive(vector); 519if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.Count) 525Vector128<T> result = Vector128.LoadUnsafe(ref xRef, 0); 546current = Vector128.LoadUnsafe(ref xRef, (uint)i); 565current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.Count));
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs (1)
79return Vector128.MaxMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitudeNumber.cs (1)
94return Vector128.MaxMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxNumber.cs (1)
90return Vector128.MaxNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs (1)
101return Vector128.Min(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs (1)
89return Vector128.MinMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitudeNumber.cs (1)
94return Vector128.MinMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinNumber.cs (1)
90return Vector128.MinNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (2)
129return Vector128.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 133return 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)
37return Vector128.RadiansToDegrees(x.AsDouble()).As<double, T>(); 42return Vector128.RadiansToDegrees(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (2)
85public static Vector128<T> Invoke(Vector128<T> x) => Vector128<T>.One / Vector128.Sqrt(x); 187return 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 (8)
184return Vector128.Round(x.AsDouble()).As<double, T>(); 189return Vector128.Round(x.AsSingle()).As<float, T>(); 253return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector128.Create(0.49999997f), x.AsSingle())).As<float, T>(); 263return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector128.Create(0.49999999999999994), x.AsDouble())).As<double, T>(); 322Vector128<T> limit = Vector128.Create(typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit)); 323return Vector128.ConditionalSelect(Vector128.LessThan(Vector128.Abs(x), limit),
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)
41public 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 (8)
41return Vector128.ConditionalSelect(Vector128.Equals(x, Vector128<T>.Zero).AsInt32(), 52if (Vector128.EqualsAny(IsNaN(x).AsInt32(), Vector128<int>.AllBitsSet)) 57return Vector128.ConditionalSelect(Vector128.LessThan(x, Vector128<T>.Zero).AsInt32(), 58Vector128.Create(-1), 59Vector128.ConditionalSelect(Vector128.GreaterThan(x, Vector128<T>.Zero).AsInt32(),
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (2)
63return Vector128.Sin(x.AsDouble()).As<double, T>(); 68return Vector128.Sin(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (10)
61Vector128<float> y = Vector128.Abs(x); 62Vector128<float> z = ExpOperator<float>.Invoke(y - Vector128.Create((float)Single_LOGV)); 63Vector128<float> result = Vector128.Create((float)Single_HALFV) * (z - (Vector128.Create((float)Single_INVV2) / z)); 64Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 72Vector128<double> y = Vector128.Abs(x); 73Vector128<double> z = ExpOperator<double>.Invoke(y - Vector128.Create(Double_LOGV)); 74Vector128<double> result = Vector128.Create(Double_HALFV) * (z - (Vector128.Create(Double_INVV2) / z)); 75Vector128<ulong> sign = x.AsUInt64() & Vector128.Create(~(ulong)long.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (7)
43Vector128<T> xpi = x * Vector128.Create(T.Pi); 47if (Vector128.GreaterThanAny(xpi.AsUInt32() & Vector128.Create(SinOperatorSingle.SignMask), Vector128.Create(SinOperatorSingle.MaxVectorizedValue))) 55if (Vector128.GreaterThanAny(xpi.AsUInt64() & Vector128.Create(SinOperatorDouble.SignMask), Vector128.Create(SinOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.Sqrt.cs (1)
30public static Vector128<T> Invoke(Vector128<T> x) => Vector128.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
51Vector128<T> diff = x - Vector128.Create(_subtrahend);
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (47)
123Vector128<float> uxMasked = Vector128.Abs(x); 124if (Vector128.GreaterThanAny(uxMasked.AsUInt32(), Vector128.Create(MaxVectorizedValue))) 129Vector128<float> dn = MultiplyAddEstimateOperator<float>.Invoke(uxMasked, Vector128.Create(2 / float.Pi), Vector128.Create(AlmHuge)); 131dn -= Vector128.Create(AlmHuge); 134f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector128.Create(-float.Pi / 2), f); 135f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector128.Create(Pi_Tail2), f); 136f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector128.Create(Pi_Tail3), f); 143Vector128<float> a1 = MultiplyAddEstimateOperator<float>.Invoke(Vector128.Create(C2), f2, Vector128.Create(C1)); 144Vector128<float> a2 = MultiplyAddEstimateOperator<float>.Invoke(Vector128.Create(C4), f2, Vector128.Create(C3)); 145Vector128<float> a3 = MultiplyAddEstimateOperator<float>.Invoke(Vector128.Create(C6), f2, Vector128.Create(C5)); 147Vector128<float> b2 = MultiplyAddEstimateOperator<float>.Invoke(f8, a3, f12 * Vector128.Create(C7)); 150Vector128<float> result = (poly.AsUInt32() ^ (x.AsUInt32() & Vector128.Create(~SignMask))).AsSingle(); 151return Vector128.ConditionalSelect(Vector128.Equals(odd, Vector128<uint>.Zero).AsSingle(), 153Vector128.Create(-1f) / result); 256Vector128<double> uxMasked = Vector128.Abs(x); 257if (Vector128.GreaterThanAny(uxMasked.AsUInt64(), Vector128.Create(MaxVectorizedValue))) 263Vector128<double> dn = MultiplyAddEstimateOperator<double>.Invoke(uxMasked, Vector128.Create(2 / double.Pi), Vector128.Create(AlmHuge)); 265dn -= Vector128.Create(AlmHuge); 269f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector128.Create(-double.Pi / 2), f); 270f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector128.Create(-HalfPi2), f); 271f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector128.Create(-HalfPi3), f); 282Vector128<double> a1 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C3), g, Vector128.Create(C1)); 283Vector128<double> a2 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C7), g, Vector128.Create(C5)); 284Vector128<double> a3 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C11), g, Vector128.Create(C9)); 285Vector128<double> a4 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C15), g, Vector128.Create(C13)); 286Vector128<double> a5 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C19), g, Vector128.Create(C17)); 287Vector128<double> a6 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C23), g, Vector128.Create(C21)); 288Vector128<double> a7 = MultiplyAddEstimateOperator<double>.Invoke(Vector128.Create(C27), g, Vector128.Create(C25)); 295Vector128<double> result = (poly.AsUInt64() ^ (x.AsUInt64() & Vector128.Create(~SignMask))).AsDouble(); 296return Vector128.ConditionalSelect(Vector128.Equals(odd, Vector128<ulong>.Zero).AsDouble(), 298Vector128.Create(-1.0) / result);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (8)
69Vector128<float> y = Vector128.Abs(x); 70Vector128<float> z = ExpM1Operator<float>.Invoke(Vector128.Create(-2f) * y); 71Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 72return (sign ^ (-z / (z + Vector128.Create(2f))).AsUInt32()).As<uint, T>(); 78Vector128<double> y = Vector128.Abs(x); 79Vector128<double> z = ExpM1Operator<double>.Invoke(Vector128.Create(-2d) * y); 80Vector128<ulong> sign = x.AsUInt64() & Vector128.Create(~(ulong)long.MaxValue); 81return (sign ^ (-z / (z + Vector128.Create(2d))).AsUInt64()).As<ulong, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
38return Vector128.Truncate(x.AsDouble()).As<double, T>(); 43return Vector128.Truncate(x.AsSingle()).As<float, T>();
System.Private.CoreLib (1636)
src\libraries\Common\src\System\HexConverter.cs (28)
104Vector128<byte> shiftedSrc = Vector128.ShiftRightLogical(src.AsUInt64(), 4).AsByte(); 105Vector128<byte> lowNibbles = Vector128.UnpackLow(shiftedSrc, src); 106Vector128<byte> highNibbles = Vector128.UnpackHigh(shiftedSrc, src); 108return (Vector128.ShuffleNative(hexMap, lowNibbles & Vector128.Create((byte)0xF)), 109Vector128.ShuffleNative(hexMap, highNibbles & Vector128.Create((byte)0xF))); 122Vector128.Create((byte)'0', (byte)'1', (byte)'2', (byte)'3', 126Vector128.Create((byte)'0', (byte)'1', (byte)'2', (byte)'3', 141Vector128<byte> vec = Vector128.CreateScalar(i32).AsByte(); 145(Vector128<ushort> v0, _) = Vector128.Widen(hexLow); 277Vector128<ushort> vec1 = Vector128.LoadUnsafe(ref srcRef, offset); 278Vector128<ushort> vec2 = Vector128.LoadUnsafe(ref srcRef, offset + (nuint)Vector128<ushort>.Count); 284Vector128<byte> t1 = vec + Vector128.Create((byte)(0xFF - '9')); 287Vector128<byte> t2 = Vector128.SubtractSaturate(t1, Vector128.Create((byte)6)); 290Vector128<byte> t3 = (vec & Vector128.Create((byte)0xDF)) - Vector128.Create((byte)'A'); 293Vector128<byte> t4 = Vector128.AddSaturate(t3, Vector128.Create((byte)10)); 297Vector128<byte> nibbles = Vector128.Min(t2 - Vector128.Create((byte)0xF0), t4); 300Vector128.AddSaturate(nibbles, Vector128.Create((byte)(127 - 15))).ExtractMostSignificantBits() != 0) 309Vector128.Create((short)0x0110).AsSByte()).AsByte(); 322Vector128<byte> zipped = PackedSimd.BitwiseSelect(nibbles, shiftedNibbles, Vector128.Create((ushort)0xFF00).AsByte()); 332output = Vector128.Shuffle(output, Vector128.Create((byte)0, 2, 4, 6, 8, 10, 12, 14, 0, 0, 0, 0, 0, 0, 0, 0));
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\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (26)
878Vector128.Create(decoder.AdvSimdLutOne3).AsByte(), 879Vector128.Create(0x37363534, 0x3B3A3938, 0xFFFF3D3C, 0xFFFFFFFF).AsByte()); 886var decLutTwo = (Vector128.Create(0x0100FF00, 0x05040302, 0x09080706, 0x0D0C0B0A).AsByte(), 887Vector128.Create(0x11100F0E, 0x15141312, 0x19181716, 0xFFFFFFFF).AsByte(), 888Vector128.Create(decoder.AdvSimdLutTwo3Uint1, 0x1F1E1D1C, 0x23222120, 0x27262524).AsByte(), 889Vector128.Create(0x2B2A2928, 0x2F2E2D2C, 0x33323130, 0xFFFFFFFF).AsByte()); 893Vector128<byte> offset = Vector128.Create<byte>(63); 952Vector128<byte> classified = (Vector128.GreaterThan(str1, offset) 953| Vector128.GreaterThan(str2, offset) 954| Vector128.GreaterThan(str3, offset) 955| Vector128.GreaterThan(str4, offset)); 1066Vector128<byte> lutHi = Vector128.Create(decoder.Vector128LutHigh).AsByte(); 1067Vector128<byte> lutLo = Vector128.Create(decoder.Vector128LutLow).AsByte(); 1068Vector128<sbyte> lutShift = Vector128.Create(decoder.Vector128LutShift).AsSByte(); 1069Vector128<sbyte> packBytesMask = Vector128.Create(0x06000102, 0x090A0405, 0x0C0D0E08, 0xffffffff).AsSByte(); 1070Vector128<byte> mergeConstant0 = Vector128.Create(0x01400140).AsByte(); 1071Vector128<short> mergeConstant1 = Vector128.Create(0x00011000).AsInt16(); 1072Vector128<byte> one = Vector128.Create((byte)1); 1073Vector128<byte> mask2F = Vector128.Create(decoder.MaskSlashOrUnderscore); 1074Vector128<byte> mask8F = Vector128.Create((byte)0x8F); 1075Vector128<byte> shiftForUnderscore = Vector128.Create((byte)33); 1088Vector128<byte> hiNibbles = Vector128.ShiftRightLogical(str.AsInt32(), 4).AsByte() & mask2F; 1110merge_ab_and_bc = Vector128.Add(evens, odds).AsInt16(); 1132output = Vector128.Add(ievens, iodds).AsInt32(); 1305Vector128<byte> eq2F = Vector128.Equals(str, maskSlashOrUnderscore); 1369str = Vector128.LoadUnsafe(ref *src);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (17)
400Vector128<byte> tblEnc1 = Vector128.Create("ABCDEFGHIJKLMNOP"u8).AsByte(); 401Vector128<byte> tblEnc2 = Vector128.Create("QRSTUVWXYZabcdef"u8).AsByte(); 402Vector128<byte> tblEnc3 = Vector128.Create("ghijklmnopqrstuv"u8).AsByte(); 403Vector128<byte> tblEnc4 = Vector128.Create(encoder.AdvSimdLut4).AsByte(); 463Vector128<byte> shuffleVec = Vector128.Create(0x01020001, 0x04050304, 0x07080607, 0x0A0B090A).AsByte(); 464Vector128<byte> lut = Vector128.Create(0xFCFC4741, 0xFCFCFCFC, 0xFCFCFCFC, encoder.Ssse3AdvSimdLutE3).AsByte(); 465Vector128<byte> maskAC = Vector128.Create(0x0fc0fc00).AsByte(); 466Vector128<byte> maskBB = Vector128.Create(0x003f03f0).AsByte(); 467Vector128<ushort> shiftAC = Vector128.Create(0x04000040).AsUInt16(); 468Vector128<short> shiftBB = Vector128.Create(0x01000010).AsInt16(); 469Vector128<byte> const51 = Vector128.Create((byte)51); 470Vector128<sbyte> const25 = Vector128.Create((sbyte)25); 471Vector128<byte> mask8F = Vector128.Create((byte)0x8F); 480Vector128<byte> str = Vector128.LoadUnsafe(ref *src); 510Vector128<ushort> odd = Vector128.ShiftRightLogical(AdvSimd.Arm64.UnzipOdd(t0.AsUInt16(), t0.AsUInt16()), 6); 511Vector128<ushort> even = Vector128.ShiftRightLogical(AdvSimd.Arm64.UnzipEven(t0.AsUInt16(), t0.AsUInt16()), 10); 566Vector128<sbyte> mask = Vector128.GreaterThan(str.AsSByte(), const25);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (6)
512Vector128<byte> below = Vector128.LessThan(str, lowerBound); 513Vector128<byte> above = Vector128.GreaterThan(str, upperBound); 514Vector128<byte> eq5F = Vector128.Equals(str, maskSlashOrUnderscore); 517Vector128<byte> outside = Vector128.AndNot(below | above, eq5F); 718Vector128<ushort> utf16VectorLower = Vector128.LoadUnsafe(ref *src); 719Vector128<ushort> utf16VectorUpper = Vector128.LoadUnsafe(ref *src, 8);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (5)
403(Vector128<ushort> utf16LowVector, Vector128<ushort> utf16HighVector) = Vector128.Widen(str); 415(Vector128<ushort> utf16LowVector1, Vector128<ushort> utf16HighVector1) = Vector128.Widen(res1); 416(Vector128<ushort> utf16LowVector2, Vector128<ushort> utf16HighVector2) = Vector128.Widen(res2); 417(Vector128<ushort> utf16LowVector3, Vector128<ushort> utf16HighVector3) = Vector128.Widen(res3); 418(Vector128<ushort> utf16LowVector4, Vector128<ushort> utf16HighVector4) = Vector128.Widen(res4);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (6)
2360if (Vector128.IsHardwareAccelerated && !insertLineBreaks && bytes.Length >= Base64VectorizationLengthThreshold) 2412if (Vector128.IsHardwareAccelerated && !insertLineBreaks && length >= Base64VectorizationLengthThreshold) 2451if (Vector128.IsHardwareAccelerated && !insertLineBreaks && bytes.Length >= Base64VectorizationLengthThreshold) 2515if (Vector128.IsHardwareAccelerated) 2523(Vector128<ushort> utf16Lower, Vector128<ushort> utf16Upper) = Vector128.Widen(Vector128.LoadUnsafe(ref src));
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (12)
162if (!Vector128.IsHardwareAccelerated || length < Vector128<ushort>.Count) 373if (Vector128.IsHardwareAccelerated && 524Vector128<ushort> ch1 = Vector128.Create((ushort)valueChar); 525Vector128<ushort> ch2 = Vector128.Create((ushort)valueCharU); 536Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.BitwiseOr(Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance)), Vector128.Create((ushort)0x20))); 537Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.BitwiseOr(Vector128.LoadUnsafe(ref searchSpace, (nuint)offset), Vector128.Create((ushort)0x20)));
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\libraries\System.Private.CoreLib\src\System\Guid.cs (19)
990if (Vector128.IsHardwareAccelerated) 992return Vector128.LoadUnsafe(ref Unsafe.As<Guid, byte>(ref Unsafe.AsRef(in left))) == Vector128.LoadUnsafe(ref Unsafe.As<Guid, byte>(ref Unsafe.AsRef(in right))); 1279(Vector128<ushort> x0, Vector128<ushort> x1) = Vector128.Widen(vecX); 1280(Vector128<ushort> y0, Vector128<ushort> y1) = Vector128.Widen(vecY); 1284(Vector128<ushort> z0, Vector128<ushort> z1) = Vector128.Widen(vecZ); 1422Vector128<byte> hexMap = Vector128.Create( 1434hexLow = Vector128.Shuffle(hexLow.AsInt16(), Vector128.Create(3, 2, 1, 0, 5, 4, 7, 6)).AsByte(); 1446Vector128<byte> vecX = Vector128.Shuffle(hexLow, 1447Vector128.Create(0x706050403020100, 0xD0CFF0B0A0908FF).AsByte()); 1450Vector128<byte> vecY = Vector128.Shuffle(hexHigh, 1451Vector128.Create(0x7060504FF030201, 0xF0E0D0C0B0A0908).AsByte()); 1455Vector128<byte> dashesMask = Vector128.Create(0x00002D000000002D, 0x2D000000002D0000).AsByte(); 1464Vector128.Create(0x0D0CFF0B0A0908FF, 0xFF13121110FF0F0E).AsByte()); 1469Vector128<byte> mid1 = Vector128.Shuffle(hexLow, 1470Vector128.Create(0x0D0CFF0B0A0908FF, 0xFFFFFFFFFFFF0F0E).AsByte()); 1471Vector128<byte> mid2 = Vector128.Shuffle(hexHigh, 1472Vector128.Create(0xFFFFFFFFFFFFFFFF, 0xFF03020100FFFFFF).AsByte());
src\libraries\System.Private.CoreLib\src\System\Math.cs (5)
364if (Vector128.IsHardwareAccelerated) 366return Vector128.ConditionalSelect(Vector128.CreateScalarUnsafe(-0.0), Vector128.CreateScalarUnsafe(y), Vector128.CreateScalarUnsafe(x)).ToScalar();
src\libraries\System.Private.CoreLib\src\System\MathF.cs (5)
119if (Vector128.IsHardwareAccelerated) 121return Vector128.ConditionalSelect(Vector128.CreateScalarUnsafe(-0.0f), Vector128.CreateScalarUnsafe(y), Vector128.CreateScalarUnsafe(x)).ToScalar();
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (4)
1914if (Vector128.IsHardwareAccelerated) 1979if (Vector128.IsHardwareAccelerated) 2044if (Vector128.IsHardwareAccelerated) 2109if (Vector128.IsHardwareAccelerated)
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.Impl.cs (63)
1275Vector128<float> V00 = Vector128.Shuffle(row3, Vector128.Create(0, 0, 1, 1)); 1276Vector128<float> V10 = Vector128.Shuffle(row4, Vector128.Create(2, 3, 2, 3)); 1277Vector128<float> V01 = Vector128.Shuffle(row1, Vector128.Create(0, 0, 1, 1)); 1278Vector128<float> V11 = Vector128.Shuffle(row2, Vector128.Create(2, 3, 2, 3)); 1286V00 = Vector128.Shuffle(row3, Vector128.Create(2, 3, 2, 3)); 1287V10 = Vector128.Shuffle(row4, Vector128.Create(0, 0, 1, 1)); 1288V01 = Vector128.Shuffle(row1, Vector128.Create(2, 3, 2, 3)); 1289V11 = Vector128.Shuffle(row2, Vector128.Create(0, 0, 1, 1)); 1293D0 = Vector128.MultiplyAddEstimate(-V00, V10, D0); 1294D1 = Vector128.MultiplyAddEstimate(-V01, V11, D1); 1295D2 = Vector128.MultiplyAddEstimate(-V02, V12, D2); 1299V00 = Vector128.Shuffle(row2, Vector128.Create(1, 2, 0, 1)); 1301V01 = Vector128.Shuffle(row1, Vector128.Create(2, 0, 1, 0)); 1306V02 = Vector128.Shuffle(row4, Vector128.Create(1, 2, 0, 1)); 1308Vector128<float> V03 = Vector128.Shuffle(row3, Vector128.Create(2, 0, 1, 0)); 1318V00 = Vector128.Shuffle(row2, Vector128.Create(2, 3, 1, 2)); 1320V01 = Vector128.Shuffle(row1, Vector128.Create(3, 2, 3, 1)); 1325V02 = Vector128.Shuffle(row4, Vector128.Create(2, 3, 1, 2)); 1327V03 = Vector128.Shuffle(row3, Vector128.Create(3, 2, 3, 1)); 1330C0 = Vector128.MultiplyAddEstimate(-V00, V10, C0); 1331C2 = Vector128.MultiplyAddEstimate(-V01, V11, C2); 1332C4 = Vector128.MultiplyAddEstimate(-V02, V12, C4); 1333C6 = Vector128.MultiplyAddEstimate(-V03, V13, C6); 1335V00 = Vector128.Shuffle(row2, Vector128.Create(3, 0, 3, 0)); 1339V10 = Vector128.Shuffle(V10, Vector128.Create(0, 3, 2, 0)); 1340V01 = Vector128.Shuffle(row1, Vector128.Create(1, 3, 0, 2)); 1344V11 = Vector128.Shuffle(V11, Vector128.Create(3, 0, 1, 2)); 1345V02 = Vector128.Shuffle(row4, Vector128.Create(3, 0, 3, 0)); 1349V12 = Vector128.Shuffle(V12, Vector128.Create(0, 3, 2, 0)); 1350V03 = Vector128.Shuffle(row3, Vector128.Create(1, 3, 0, 2)); 1354V13 = Vector128.Shuffle(V13, Vector128.Create(3, 0, 1, 2)); 1378C0 = Vector128.Shuffle(C0, Vector128.Create(0, 2, 1, 3)); 1379C2 = Vector128.Shuffle(C2, Vector128.Create(0, 2, 1, 3)); 1380C4 = Vector128.Shuffle(C4, Vector128.Create(0, 2, 1, 3)); 1381C6 = Vector128.Shuffle(C6, Vector128.Create(0, 2, 1, 3));
src\libraries\System.Private.CoreLib\src\System\Numerics\Plane.cs (7)
58internal static Plane Create(float x, float y, float z, float d) => Vector128.Create(x, y, z, d).AsPlane(); 92public static float Dot(Plane plane, Vector4 value) => Vector128.Dot(plane.AsVector128(), value.AsVector128()); 126Vector128<float> lengthSquared = Vector128.Create(value.Normal.LengthSquared()); 128return Vector128.AndNot( 129(value.AsVector128() / Vector128.Sqrt(lengthSquared)), 130Vector128.Equals(lengthSquared, Vector128.Create(float.PositiveInfinity))
src\libraries\System.Private.CoreLib\src\System\Numerics\Quaternion.cs (24)
136result = Vector128.MultiplyAddEstimate(Vector128.Shuffle(right, Vector128.Create(3, 2, 1, 0)) * left.GetElement(0), Vector128.Create(+1.0f, -1.0f, +1.0f, -1.0f), result); 137result = Vector128.MultiplyAddEstimate(Vector128.Shuffle(right, Vector128.Create(2, 3, 0, 1)) * left.GetElement(1), Vector128.Create(+1.0f, +1.0f, -1.0f, -1.0f), result); 138result = Vector128.MultiplyAddEstimate(Vector128.Shuffle(right, Vector128.Create(1, 0, 3, 2)) * left.GetElement(2), Vector128.Create(-1.0f, +1.0f, +1.0f, -1.0f), result); 191return (value.AsVector128() * Vector128.Create(-1.0f, -1.0f, -1.0f, 1.0f)).AsQuaternion(); 201internal static Quaternion Create(float x, float y, float z, float w) => Vector128.Create(x, y, z, w).AsQuaternion(); 312public static float Dot(Quaternion quaternion1, Quaternion quaternion2) => Vector128.Dot(quaternion1.AsVector128(), quaternion2.AsVector128()); 330Vector128<float> lengthSquared = Vector128.Create(value.LengthSquared()); 331return Vector128.AndNot( 333Vector128.LessThanOrEqual(lengthSquared, Vector128.Create(Epsilon)) 346q2 = Vector128.ConditionalSelect( 347Vector128.GreaterThanOrEqual(Vector128.Create(Dot(quaternion1, quaternion2)), Vector128<float>.Zero), 352Vector128<float> result = Vector128.MultiplyAddEstimate(quaternion1.AsVector128(), Vector128.Create(1.0f - amount), q2 * amount);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (72)
65/// <inheritdoc cref="Vector128.All{T}(Vector128{T}, T)" /> 70/// <inheritdoc cref="Vector128.AllWhereAllBitsSet{T}(Vector128{T})" /> 97/// <inheritdoc cref="Vector128.Any{T}(Vector128{T}, T)" /> 102/// <inheritdoc cref="Vector128.AnyWhereAllBitsSet{T}(Vector128{T})" /> 330/// <inheritdoc cref="Vector128.Clamp{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 338/// <inheritdoc cref="Vector128.ClampNative{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 393return Vector128.ConvertToDouble(value.AsVector128()).AsVector(); 416return Vector128.ConvertToDouble(value.AsVector128()).AsVector(); 524return Vector128.ConvertToSingle(value.AsVector128()).AsVector(); 614/// <inheritdoc cref="Vector128.Cos(Vector128{double})" /> 628/// <inheritdoc cref="Vector128.Cos(Vector128{float})" /> 642/// <inheritdoc cref="Vector128.CopySign{T}(Vector128{T}, Vector128{T})" /> 675/// <inheritdoc cref="Vector128.Count{T}(Vector128{T}, T)" /> 691return Vector128.Count(vector.AsVector128(), value); 695/// <inheritdoc cref="Vector128.CountWhereAllBitsSet{T}(Vector128{T})" /> 803/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{double})" /> 818/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{float})" /> 947/// <inheritdoc cref="Vector128.Exp(Vector128{double})" /> 961/// <inheritdoc cref="Vector128.Exp(Vector128{float})" /> 1304/// <inheritdoc cref="Vector128.Hypot(Vector128{double}, Vector128{double})" /> 1318/// <inheritdoc cref="Vector128.Hypot(Vector128{float}, Vector128{float})" /> 1332/// <inheritdoc cref="Vector128.IndexOf{T}(Vector128{T}, T)" /> 1348return Vector128.IndexOf(vector.AsVector128(), value); 1352/// <inheritdoc cref="Vector128.IndexOfWhereAllBitsSet{T}(Vector128{T})" /> 1371/// <inheritdoc cref="Vector128.IsEvenInteger{T}(Vector128{T})" /> 1387/// <inheritdoc cref="Vector128.IsFinite{T}(Vector128{T})" /> 1403/// <inheritdoc cref="Vector128.IsInfinity{T}(Vector128{T})" /> 1415/// <inheritdoc cref="Vector128.IsInteger{T}(Vector128{T})" /> 1427/// <inheritdoc cref="Vector128.IsNaN{T}(Vector128{T})" /> 1439/// <inheritdoc cref="Vector128.IsNegative{T}(Vector128{T})" /> 1466/// <inheritdoc cref="Vector128.IsNegativeInfinity{T}(Vector128{T})" /> 1482/// <inheritdoc cref="Vector128.IsNormal{T}(Vector128{T})" /> 1498/// <inheritdoc cref="Vector128.IsOddInteger{T}(Vector128{T})" /> 1514/// <inheritdoc cref="Vector128.IsPositive{T}(Vector128{T})" /> 1541/// <inheritdoc cref="Vector128.IsPositiveInfinity{T}(Vector128{T})" /> 1557/// <inheritdoc cref="Vector128.IsSubnormal{T}(Vector128{T})" /> 1573/// <inheritdoc cref="Vector128.IsZero{T}(Vector128{T})" /> 1578/// <inheritdoc cref="Vector128.LastIndexOf{T}(Vector128{T}, T)" /> 1594return Vector128.LastIndexOf(vector.AsVector128(), value); 1598/// <inheritdoc cref="Vector128.LastIndexOfWhereAllBitsSet{T}(Vector128{T})" /> 1928/// <inheritdoc cref="Vector128.Log(Vector128{double})" /> 1942/// <inheritdoc cref="Vector128.Log(Vector128{float})" /> 1970/// <inheritdoc cref="Vector128.Log2(Vector128{double})" /> 1984/// <inheritdoc cref="Vector128.Log2(Vector128{float})" /> 1998/// <inheritdoc cref="Vector128.Max{T}(Vector128{T}, Vector128{T})" /> 2021/// <inheritdoc cref="Vector128.MaxMagnitude{T}(Vector128{T}, Vector128{T})" /> 2044/// <inheritdoc cref="Vector128.MaxMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2067/// <inheritdoc cref="Vector128.MaxNative{T}(Vector128{T}, Vector128{T})" /> 2090/// <inheritdoc cref="Vector128.MaxNumber{T}(Vector128{T}, Vector128{T})" /> 2113/// <inheritdoc cref="Vector128.Min{T}(Vector128{T}, Vector128{T})" /> 2136/// <inheritdoc cref="Vector128.MinMagnitude{T}(Vector128{T}, Vector128{T})" /> 2159/// <inheritdoc cref="Vector128.MinMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2182/// <inheritdoc cref="Vector128.MinNative{T}(Vector128{T}, Vector128{T})" /> 2205/// <inheritdoc cref="Vector128.MinNumber{T}(Vector128{T}, Vector128{T})" /> 2267/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{double}, Vector128{double}, Vector128{double})" /> 2283/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 2485/// <inheritdoc cref="Vector128.None{T}(Vector128{T}, T)" /> 2490/// <inheritdoc cref="Vector128.NoneWhereAllBitsSet{T}(Vector128{T})" /> 2530/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{double})" /> 2544/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{float})" /> 2589/// <inheritdoc cref="Vector128.Round(Vector128{double})" /> 2593/// <inheritdoc cref="Vector128.Round(Vector128{float})" /> 2597/// <inheritdoc cref="Vector128.Round(Vector128{double}, MidpointRounding)" /> 2601/// <inheritdoc cref="Vector128.Round(Vector128{float}, MidpointRounding)" /> 2686return Vector128.ShiftLeft(vector.AsVector128(), shiftCount.AsVector128()).AsVector(); 2712return Vector128.ShiftLeft(vector.AsVector128(), shiftCount.AsVector128()).AsVector(); 2841/// <inheritdoc cref="Vector128.Sin(Vector128{double})" /> 2855/// <inheritdoc cref="Vector128.Sin(Vector128{float})" /> 2885/// <inheritdoc cref="Vector128.SinCos(Vector128{double})" /> 2899/// <inheritdoc cref="Vector128.SinCos(Vector128{float})" /> 3069/// <inheritdoc cref="Vector128.Truncate(Vector128{double})" /> 3073/// <inheritdoc cref="Vector128.Truncate(Vector128{float})" />
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (89)
311public static Vector2 Abs(Vector2 value) => Vector128.Abs(value.AsVector128Unsafe()).AsVector2(); 323public static bool All(Vector2 vector, float value) => Vector128.All(vector, value); 328public static bool AllWhereAllBitsSet(Vector2 vector) => Vector128.AllWhereAllBitsSet(vector); 333public static Vector2 AndNot(Vector2 left, Vector2 right) => Vector128.AndNot(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 338public static bool Any(Vector2 vector, float value) => Vector128.Any(vector, value); 343public static bool AnyWhereAllBitsSet(Vector2 vector) => Vector128.AnyWhereAllBitsSet(vector); 356public static Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max) => Vector128.Clamp(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector2(); 361public static Vector2 ClampNative(Vector2 value1, Vector2 min, Vector2 max) => Vector128.ClampNative(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector2(); 366public static Vector2 ConditionalSelect(Vector2 condition, Vector2 left, Vector2 right) => Vector128.ConditionalSelect(condition.AsVector128Unsafe(), left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 371public static Vector2 CopySign(Vector2 value, Vector2 sign) => Vector128.CopySign(value.AsVector128Unsafe(), sign.AsVector128Unsafe()).AsVector2(); 375public static Vector2 Cos(Vector2 vector) => Vector128.Cos(vector.AsVector128()).AsVector2(); 380public static int Count(Vector2 vector, float value) => Vector128.Count(vector, value); 385public static int CountWhereAllBitsSet(Vector2 vector) => Vector128.CountWhereAllBitsSet(vector); 391public static Vector2 Create(float value) => Vector128.Create(value).AsVector2(); 398public static Vector2 Create(float x, float y) => Vector128.Create(x, y, 0, 0).AsVector2(); 418internal static Vector2 CreateScalar(float x) => Vector128.CreateScalar(x).AsVector2(); 424internal static Vector2 CreateScalarUnsafe(float x) => Vector128.CreateScalarUnsafe(x).AsVector2(); 444Vector128.Shuffle(value1.AsVector128Unsafe(), Vector128.Create(0, 1, 0, 1)) * 445Vector128.Shuffle(value2.AsVector128Unsafe(), Vector128.Create(1, 0, 1, 0)); 447return (mul - Vector128.Shuffle(mul, Vector128.Create(1, 0, 1, 0))).ToScalar(); 453public static Vector2 DegreesToRadians(Vector2 degrees) => Vector128.DegreesToRadians(degrees.AsVector128Unsafe()).AsVector2(); 489public static float Dot(Vector2 value1, Vector2 value2) => Vector128.Dot(value1.AsVector128(), value2.AsVector128()); 493public static Vector2 Exp(Vector2 vector) => Vector128.Exp(vector.AsVector128()).AsVector2(); 498public static Vector2 Equals(Vector2 left, Vector2 right) => Vector128.Equals(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 503public static bool EqualsAll(Vector2 left, Vector2 right) => Vector128.EqualsAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 508public static bool EqualsAny(Vector2 left, Vector2 right) => Vector128.EqualsAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 510/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 513public static Vector2 FusedMultiplyAdd(Vector2 left, Vector2 right, Vector2 addend) => Vector128.FusedMultiplyAdd(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector2(); 518public static Vector2 GreaterThan(Vector2 left, Vector2 right) => Vector128.GreaterThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 523public static bool GreaterThanAll(Vector2 left, Vector2 right) => Vector128.GreaterThanAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 528public static bool GreaterThanAny(Vector2 left, Vector2 right) => Vector128.GreaterThanAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 533public static Vector2 GreaterThanOrEqual(Vector2 left, Vector2 right) => Vector128.GreaterThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 538public static bool GreaterThanOrEqualAll(Vector2 left, Vector2 right) => Vector128.GreaterThanOrEqualAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 543public static bool GreaterThanOrEqualAny(Vector2 left, Vector2 right) => Vector128.GreaterThanOrEqualAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 548public static Vector2 Hypot(Vector2 x, Vector2 y) => Vector128.Hypot(x.AsVector128Unsafe(), y.AsVector128Unsafe()).AsVector2(); 553public static int IndexOf(Vector2 vector, float value) => Vector128.IndexOf(vector, value); 558public static int IndexOfWhereAllBitsSet(Vector2 vector) => Vector128.IndexOfWhereAllBitsSet(vector); 563public static Vector2 IsEvenInteger(Vector2 vector) => Vector128.IsEvenInteger(vector.AsVector128()).AsVector2(); 568public static Vector2 IsFinite(Vector2 vector) => Vector128.IsFinite(vector.AsVector128()).AsVector2(); 573public static Vector2 IsInfinity(Vector2 vector) => Vector128.IsInfinity(vector.AsVector128()).AsVector2(); 578public static Vector2 IsInteger(Vector2 vector) => Vector128.IsInteger(vector.AsVector128()).AsVector2(); 583public static Vector2 IsNaN(Vector2 vector) => Vector128.IsNaN(vector.AsVector128()).AsVector2(); 588public static Vector2 IsNegative(Vector2 vector) => Vector128.IsNegative(vector.AsVector128()).AsVector2(); 593public static Vector2 IsNegativeInfinity(Vector2 vector) => Vector128.IsNegativeInfinity(vector.AsVector128()).AsVector2(); 598public static Vector2 IsNormal(Vector2 vector) => Vector128.IsNormal(vector.AsVector128()).AsVector2(); 603public static Vector2 IsOddInteger(Vector2 vector) => Vector128.IsOddInteger(vector.AsVector128()).AsVector2(); 608public static Vector2 IsPositive(Vector2 vector) => Vector128.IsPositive(vector.AsVector128()).AsVector2(); 613public static Vector2 IsPositiveInfinity(Vector2 vector) => Vector128.IsPositiveInfinity(vector.AsVector128()).AsVector2(); 618public static Vector2 IsSubnormal(Vector2 vector) => Vector128.IsSubnormal(vector.AsVector128()).AsVector2(); 623public static Vector2 IsZero(Vector2 vector) => Vector128.IsZero(vector.AsVector128()).AsVector2(); 628public static int LastIndexOf(Vector2 vector, float value) => Vector128.LastIndexOf(vector, value); 633public static int LastIndexOfWhereAllBitsSet(Vector2 vector) => Vector128.LastIndexOfWhereAllBitsSet(vector); 643public static Vector2 Lerp(Vector2 value1, Vector2 value2, Vector2 amount) => Vector128.Lerp(value1.AsVector128Unsafe(), value2.AsVector128Unsafe(), amount.AsVector128Unsafe()).AsVector2(); 648public static Vector2 LessThan(Vector2 left, Vector2 right) => Vector128.LessThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 653public static bool LessThanAll(Vector2 left, Vector2 right) => Vector128.LessThanAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 658public static bool LessThanAny(Vector2 left, Vector2 right) => Vector128.LessThanAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 663public static Vector2 LessThanOrEqual(Vector2 left, Vector2 right) => Vector128.LessThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector2(); 668public static bool LessThanOrEqualAll(Vector2 left, Vector2 right) => Vector128.LessThanOrEqualAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 673public static bool LessThanOrEqualAny(Vector2 left, Vector2 right) => Vector128.LessThanOrEqualAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 699/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T)" /> 720public static Vector2 Log(Vector2 vector) => Vector128.Log(Vector4.Create(vector, 1.0f, 1.0f).AsVector128()).AsVector2(); 724public static Vector2 Log2(Vector2 vector) => Vector128.Log2(Vector4.Create(vector, 1.0f, 1.0f).AsVector128()).AsVector2(); 729public static Vector2 Max(Vector2 value1, Vector2 value2) => Vector128.Max(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 734public static Vector2 MaxMagnitude(Vector2 value1, Vector2 value2) => Vector128.MaxMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 739public static Vector2 MaxMagnitudeNumber(Vector2 value1, Vector2 value2) => Vector128.MaxMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 744public static Vector2 MaxNative(Vector2 value1, Vector2 value2) => Vector128.MaxNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 749public static Vector2 MaxNumber(Vector2 value1, Vector2 value2) => Vector128.MaxNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 754public static Vector2 Min(Vector2 value1, Vector2 value2) => Vector128.Min(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 759public static Vector2 MinMagnitude(Vector2 value1, Vector2 value2) => Vector128.MinMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 764public static Vector2 MinMagnitudeNumber(Vector2 value1, Vector2 value2) => Vector128.MinMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 769public static Vector2 MinNative(Vector2 value1, Vector2 value2) => Vector128.MinNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 774public static Vector2 MinNumber(Vector2 value1, Vector2 value2) => Vector128.MinNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector2(); 797/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 800public static Vector2 MultiplyAddEstimate(Vector2 left, Vector2 right, Vector2 addend) => Vector128.MultiplyAddEstimate(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector2(); 811public static bool None(Vector2 vector, float value) => Vector128.None(vector, value); 816public static bool NoneWhereAllBitsSet(Vector2 vector) => Vector128.NoneWhereAllBitsSet(vector); 831public static Vector2 RadiansToDegrees(Vector2 radians) => Vector128.RadiansToDegrees(radians.AsVector128Unsafe()).AsVector2(); 850public static Vector2 Round(Vector2 vector) => Vector128.Round(vector.AsVector128Unsafe()).AsVector2(); 854public static Vector2 Round(Vector2 vector, MidpointRounding mode) => Vector128.Round(vector.AsVector128Unsafe(), mode).AsVector2(); 866return Vector128.Shuffle(vector.AsVector128(), Vector128.Create(xIndex, yIndex, 2, 3)).AsVector2(); 871public static Vector2 Sin(Vector2 vector) => Vector128.Sin(vector.AsVector128()).AsVector2(); 877(Vector128<float> sin, Vector128<float> cos) = Vector128.SinCos(vector.AsVector128()); 886public static Vector2 SquareRoot(Vector2 value) => Vector128.Sqrt(value.AsVector128Unsafe()).AsVector2(); 898public static float Sum(Vector2 value) => Vector128.Sum(value.AsVector128()); 958public static Vector2 Truncate(Vector2 vector) => Vector128.Truncate(vector.AsVector128Unsafe()).AsVector2();
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (92)
332public static Vector3 Abs(Vector3 value) => Vector128.Abs(value.AsVector128Unsafe()).AsVector3(); 344public static bool All(Vector3 vector, float value) => Vector128.All(vector, value); 349public static bool AllWhereAllBitsSet(Vector3 vector) => Vector128.AllWhereAllBitsSet(vector); 354public static Vector3 AndNot(Vector3 left, Vector3 right) => Vector128.AndNot(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 359public static bool Any(Vector3 vector, float value) => Vector128.Any(vector, value); 364public static bool AnyWhereAllBitsSet(Vector3 vector) => Vector128.AnyWhereAllBitsSet(vector); 377public static Vector3 Clamp(Vector3 value1, Vector3 min, Vector3 max) => Vector128.Clamp(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector3(); 382public static Vector3 ClampNative(Vector3 value1, Vector3 min, Vector3 max) => Vector128.ClampNative(value1.AsVector128Unsafe(), min.AsVector128Unsafe(), max.AsVector128Unsafe()).AsVector3(); 387public static Vector3 ConditionalSelect(Vector3 condition, Vector3 left, Vector3 right) => Vector128.ConditionalSelect(condition.AsVector128Unsafe(), left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 392public static Vector3 CopySign(Vector3 value, Vector3 sign) => Vector128.CopySign(value.AsVector128Unsafe(), sign.AsVector128Unsafe()).AsVector3(); 396public static Vector3 Cos(Vector3 vector) => Vector128.Cos(vector.AsVector128()).AsVector3(); 401public static int Count(Vector3 vector, float value) => Vector128.Count(vector, value); 406public static int CountWhereAllBitsSet(Vector3 vector) => Vector128.CountWhereAllBitsSet(vector); 412public static Vector3 Create(float value) => Vector128.Create(value).AsVector3(); 433public static Vector3 Create(float x, float y, float z) => Vector128.Create(x, y, z, 0).AsVector3(); 453internal static Vector3 CreateScalar(float x) => Vector128.CreateScalar(x).AsVector3(); 459internal static Vector3 CreateScalarUnsafe(float x) => Vector128.CreateScalarUnsafe(x).AsVector3(); 474Vector128<float> temp = Vector128.Shuffle(v1, Vector128.Create(1, 2, 0, 0)) * Vector128.Shuffle(v2, Vector128.Create(2, 0, 1, 0)); 476return Vector128.MultiplyAddEstimate( 477-Vector128.Shuffle(v1, Vector128.Create(2, 0, 1, 0)), 478Vector128.Shuffle(v2, Vector128.Create(1, 2, 0, 0)), 486public static Vector3 DegreesToRadians(Vector3 degrees) => Vector128.DegreesToRadians(degrees.AsVector128Unsafe()).AsVector3(); 522public static float Dot(Vector3 vector1, Vector3 vector2) => Vector128.Dot(vector1.AsVector128(), vector2.AsVector128()); 526public static Vector3 Exp(Vector3 vector) => Vector128.Exp(vector.AsVector128()).AsVector3(); 531public static Vector3 Equals(Vector3 left, Vector3 right) => Vector128.Equals(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 536public static bool EqualsAll(Vector3 left, Vector3 right) => Vector128.EqualsAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 541public static bool EqualsAny(Vector3 left, Vector3 right) => Vector128.EqualsAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 543/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 546public static Vector3 FusedMultiplyAdd(Vector3 left, Vector3 right, Vector3 addend) => Vector128.FusedMultiplyAdd(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector3(); 551public static Vector3 GreaterThan(Vector3 left, Vector3 right) => Vector128.GreaterThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 556public static bool GreaterThanAll(Vector3 left, Vector3 right) => Vector128.GreaterThanAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 561public static bool GreaterThanAny(Vector3 left, Vector3 right) => Vector128.GreaterThanAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 566public static Vector3 GreaterThanOrEqual(Vector3 left, Vector3 right) => Vector128.GreaterThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 571public static bool GreaterThanOrEqualAll(Vector3 left, Vector3 right) => Vector128.GreaterThanOrEqualAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 576public static bool GreaterThanOrEqualAny(Vector3 left, Vector3 right) => Vector128.GreaterThanOrEqualAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 581public static Vector3 Hypot(Vector3 x, Vector3 y) => Vector128.Hypot(x.AsVector128Unsafe(), y.AsVector128Unsafe()).AsVector3(); 586public static int IndexOf(Vector3 vector, float value) => Vector128.IndexOf(vector, value); 591public static int IndexOfWhereAllBitsSet(Vector3 vector) => Vector128.IndexOfWhereAllBitsSet(vector); 596public static Vector3 IsEvenInteger(Vector3 vector) => Vector128.IsEvenInteger(vector.AsVector128()).AsVector3(); 601public static Vector3 IsFinite(Vector3 vector) => Vector128.IsFinite(vector.AsVector128()).AsVector3(); 606public static Vector3 IsInfinity(Vector3 vector) => Vector128.IsInfinity(vector.AsVector128()).AsVector3(); 611public static Vector3 IsInteger(Vector3 vector) => Vector128.IsInteger(vector.AsVector128()).AsVector3(); 616public static Vector3 IsNaN(Vector3 vector) => Vector128.IsNaN(vector.AsVector128()).AsVector3(); 621public static Vector3 IsNegative(Vector3 vector) => Vector128.IsNegative(vector.AsVector128()).AsVector3(); 626public static Vector3 IsNegativeInfinity(Vector3 vector) => Vector128.IsNegativeInfinity(vector.AsVector128()).AsVector3(); 631public static Vector3 IsNormal(Vector3 vector) => Vector128.IsNormal(vector.AsVector128()).AsVector3(); 636public static Vector3 IsOddInteger(Vector3 vector) => Vector128.IsOddInteger(vector.AsVector128()).AsVector3(); 641public static Vector3 IsPositive(Vector3 vector) => Vector128.IsPositive(vector.AsVector128()).AsVector3(); 646public static Vector3 IsPositiveInfinity(Vector3 vector) => Vector128.IsPositiveInfinity(vector.AsVector128()).AsVector3(); 651public static Vector3 IsSubnormal(Vector3 vector) => Vector128.IsSubnormal(vector.AsVector128()).AsVector3(); 656public static Vector3 IsZero(Vector3 vector) => Vector128.IsZero(vector.AsVector128()).AsVector3(); 661public static int LastIndexOf(Vector3 vector, float value) => Vector128.LastIndexOf(vector, value); 666public static int LastIndexOfWhereAllBitsSet(Vector3 vector) => Vector128.LastIndexOfWhereAllBitsSet(vector); 676public static Vector3 Lerp(Vector3 value1, Vector3 value2, Vector3 amount) => Vector128.Lerp(value1.AsVector128Unsafe(), value2.AsVector128Unsafe(), amount.AsVector128Unsafe()).AsVector3(); 681public static Vector3 LessThan(Vector3 left, Vector3 right) => Vector128.LessThan(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 686public static bool LessThanAll(Vector3 left, Vector3 right) => Vector128.LessThanAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 691public static bool LessThanAny(Vector3 left, Vector3 right) => Vector128.LessThanAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 696public static Vector3 LessThanOrEqual(Vector3 left, Vector3 right) => Vector128.LessThanOrEqual(left.AsVector128Unsafe(), right.AsVector128Unsafe()).AsVector3(); 701public static bool LessThanOrEqualAll(Vector3 left, Vector3 right) => Vector128.LessThanOrEqualAll(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 706public static bool LessThanOrEqualAny(Vector3 left, Vector3 right) => Vector128.LessThanOrEqualAny(left.AsVector128Unsafe(), right.AsVector128Unsafe()); 732/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T)" /> 753public static Vector3 Log(Vector3 vector) => Vector128.Log(Vector4.Create(vector, 1.0f).AsVector128()).AsVector3(); 757public static Vector3 Log2(Vector3 vector) => Vector128.Log2(Vector4.Create(vector, 1.0f).AsVector128()).AsVector3(); 762public static Vector3 Max(Vector3 value1, Vector3 value2) => Vector128.Max(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 767public static Vector3 MaxMagnitude(Vector3 value1, Vector3 value2) => Vector128.MaxMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 772public static Vector3 MaxMagnitudeNumber(Vector3 value1, Vector3 value2) => Vector128.MaxMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 777public static Vector3 MaxNative(Vector3 value1, Vector3 value2) => Vector128.MaxNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 782public static Vector3 MaxNumber(Vector3 value1, Vector3 value2) => Vector128.MaxNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 787public static Vector3 Min(Vector3 value1, Vector3 value2) => Vector128.Min(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 792public static Vector3 MinMagnitude(Vector3 value1, Vector3 value2) => Vector128.MinMagnitude(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 797public static Vector3 MinMagnitudeNumber(Vector3 value1, Vector3 value2) => Vector128.MinMagnitudeNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 802public static Vector3 MinNative(Vector3 value1, Vector3 value2) => Vector128.MinNative(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 807public static Vector3 MinNumber(Vector3 value1, Vector3 value2) => Vector128.MinNumber(value1.AsVector128Unsafe(), value2.AsVector128Unsafe()).AsVector3(); 830/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 833public static Vector3 MultiplyAddEstimate(Vector3 left, Vector3 right, Vector3 addend) => Vector128.MultiplyAddEstimate(left.AsVector128Unsafe(), right.AsVector128Unsafe(), addend.AsVector128Unsafe()).AsVector3(); 844public static bool None(Vector3 vector, float value) => Vector128.None(vector, value); 849public static bool NoneWhereAllBitsSet(Vector3 vector) => Vector128.NoneWhereAllBitsSet(vector); 864public static Vector3 RadiansToDegrees(Vector3 radians) => Vector128.RadiansToDegrees(radians.AsVector128Unsafe()).AsVector3(); 883public static Vector3 Round(Vector3 vector) => Vector128.Round(vector.AsVector128Unsafe()).AsVector3(); 887public static Vector3 Round(Vector3 vector, MidpointRounding mode) => Vector128.Round(vector.AsVector128Unsafe(), mode).AsVector3(); 900return Vector128.Shuffle(vector.AsVector128(), Vector128.Create(xIndex, yIndex, zIndex, 3)).AsVector3(); 905public static Vector3 Sin(Vector3 vector) => Vector128.Sin(vector.AsVector128()).AsVector3(); 911(Vector128<float> sin, Vector128<float> cos) = Vector128.SinCos(vector.AsVector128()); 920public static Vector3 SquareRoot(Vector3 value) => Vector128.Sqrt(value.AsVector128Unsafe()).AsVector3(); 932public static float Sum(Vector3 value) => Vector128.Sum(value.AsVector128()); 968public static Vector3 Truncate(Vector3 vector) => Vector128.Truncate(vector.AsVector128Unsafe()).AsVector3();
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (175)
364public static Vector4 Abs(Vector4 value) => Vector128.Abs(value.AsVector128()).AsVector4(); 373/// <inheritdoc cref="Vector128.All{T}(Vector128{T}, T)" /> 376public static bool All(Vector4 vector, float value) => Vector128.All(vector.AsVector128(), value); 378/// <inheritdoc cref="Vector128.AllWhereAllBitsSet{T}(Vector128{T})" /> 381public static bool AllWhereAllBitsSet(Vector4 vector) => Vector128.AllWhereAllBitsSet(vector.AsVector128()); 383/// <inheritdoc cref="Vector128.AndNot{T}(Vector128{T}, Vector128{T})" /> 386public static Vector4 AndNot(Vector4 left, Vector4 right) => Vector128.AndNot(left.AsVector128(), right.AsVector128()).AsVector4(); 388/// <inheritdoc cref="Vector128.Any{T}(Vector128{T}, T)" /> 391public static bool Any(Vector4 vector, float value) => Vector128.Any(vector.AsVector128(), value); 393/// <inheritdoc cref="Vector128.AnyWhereAllBitsSet{T}(Vector128{T})" /> 396public static bool AnyWhereAllBitsSet(Vector4 vector) => Vector128.AnyWhereAllBitsSet(vector.AsVector128()); 398/// <inheritdoc cref="Vector128.BitwiseAnd{T}(Vector128{T}, Vector128{T})" /> 402/// <inheritdoc cref="Vector128.BitwiseOr{T}(Vector128{T}, Vector128{T})" /> 406/// <inheritdoc cref="Vector128.Clamp{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 409public static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max) => Vector128.Clamp(value1.AsVector128(), min.AsVector128(), max.AsVector128()).AsVector4(); 411/// <inheritdoc cref="Vector128.ClampNative{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 414public static Vector4 ClampNative(Vector4 value1, Vector4 min, Vector4 max) => Vector128.ClampNative(value1.AsVector128(), min.AsVector128(), max.AsVector128()).AsVector4(); 416/// <inheritdoc cref="Vector128.ConditionalSelect{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 419public static Vector4 ConditionalSelect(Vector4 condition, Vector4 left, Vector4 right) => Vector128.ConditionalSelect(condition.AsVector128(), left.AsVector128(), right.AsVector128()).AsVector4(); 421/// <inheritdoc cref="Vector128.CopySign{T}(Vector128{T}, Vector128{T})" /> 424public static Vector4 CopySign(Vector4 value, Vector4 sign) => Vector128.CopySign(value.AsVector128(), sign.AsVector128()).AsVector4(); 426/// <inheritdoc cref="Vector128.Cos(Vector128{float})" /> 428public static Vector4 Cos(Vector4 vector) => Vector128.Cos(vector.AsVector128()).AsVector4(); 430/// <inheritdoc cref="Vector128.Count{T}(Vector128{T}, T)" /> 433public static int Count(Vector4 vector, float value) => Vector128.Count(vector.AsVector128(), value); 435/// <inheritdoc cref="Vector128.CountWhereAllBitsSet{T}(Vector128{T})" /> 438public static int CountWhereAllBitsSet(Vector4 vector) => Vector128.CountWhereAllBitsSet(vector.AsVector128()); 444public static Vector4 Create(float value) => Vector128.Create(value).AsVector4(); 481public static Vector4 Create(float x, float y, float z, float w) => Vector128.Create(x, y, z, w).AsVector4(); 487public static Vector4 Create(ReadOnlySpan<float> values) => Vector128.Create(values).AsVector4(); 493internal static Vector4 CreateScalar(float x) => Vector128.CreateScalar(x).AsVector4(); 499internal static Vector4 CreateScalarUnsafe(float x) => Vector128.CreateScalarUnsafe(x).AsVector4(); 531Vector128<float> m2 = Vector128.Shuffle(v1, Vector128.Create(2, 0, 1, 3)) * 532Vector128.Shuffle(v2, Vector128.Create(1, 2, 0, 3)); 534return Vector128.MultiplyAddEstimate( 535Vector128.Shuffle(v1, Vector128.Create(1, 2, 0, 3)), 536Vector128.Shuffle(v2, Vector128.Create(2, 0, 1, 3)), 541/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{float})" /> 544public static Vector4 DegreesToRadians(Vector4 degrees) => Vector128.DegreesToRadians(degrees.AsVector128()).AsVector4(); 580public static float Dot(Vector4 vector1, Vector4 vector2) => Vector128.Dot(vector1.AsVector128(), vector2.AsVector128()); 582/// <inheritdoc cref="Vector128.Exp(Vector128{float})" /> 584public static Vector4 Exp(Vector4 vector) => Vector128.Exp(vector.AsVector128()).AsVector4(); 586/// <inheritdoc cref="Vector128.Equals{T}(Vector128{T}, Vector128{T})" /> 589public static Vector4 Equals(Vector4 left, Vector4 right) => Vector128.Equals(left.AsVector128(), right.AsVector128()).AsVector4(); 591/// <inheritdoc cref="Vector128.EqualsAll{T}(Vector128{T}, Vector128{T})" /> 594public static bool EqualsAll(Vector4 left, Vector4 right) => Vector128.EqualsAll(left.AsVector128(), right.AsVector128()); 596/// <inheritdoc cref="Vector128.EqualsAny{T}(Vector128{T}, Vector128{T})" /> 599public static bool EqualsAny(Vector4 left, Vector4 right) => Vector128.EqualsAny(left.AsVector128(), right.AsVector128()); 601/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 604public static Vector4 FusedMultiplyAdd(Vector4 left, Vector4 right, Vector4 addend) => Vector128.FusedMultiplyAdd(left.AsVector128(), right.AsVector128(), addend.AsVector128()).AsVector4(); 606/// <inheritdoc cref="Vector128.GreaterThan{T}(Vector128{T}, Vector128{T})" /> 609public static Vector4 GreaterThan(Vector4 left, Vector4 right) => Vector128.GreaterThan(left.AsVector128(), right.AsVector128()).AsVector4(); 611/// <inheritdoc cref="Vector128.GreaterThanAll{T}(Vector128{T}, Vector128{T})" /> 614public static bool GreaterThanAll(Vector4 left, Vector4 right) => Vector128.GreaterThanAll(left.AsVector128(), right.AsVector128()); 616/// <inheritdoc cref="Vector128.GreaterThanAny{T}(Vector128{T}, Vector128{T})" /> 619public static bool GreaterThanAny(Vector4 left, Vector4 right) => Vector128.GreaterThanAny(left.AsVector128(), right.AsVector128()); 621/// <inheritdoc cref="Vector128.GreaterThanOrEqual{T}(Vector128{T}, Vector128{T})" /> 624public static Vector4 GreaterThanOrEqual(Vector4 left, Vector4 right) => Vector128.GreaterThanOrEqual(left.AsVector128(), right.AsVector128()).AsVector4(); 626/// <inheritdoc cref="Vector128.GreaterThanOrEqualAll{T}(Vector128{T}, Vector128{T})" /> 629public static bool GreaterThanOrEqualAll(Vector4 left, Vector4 right) => Vector128.GreaterThanOrEqualAll(left.AsVector128(), right.AsVector128()); 631/// <inheritdoc cref="Vector128.GreaterThanOrEqualAny{T}(Vector128{T}, Vector128{T})" /> 634public static bool GreaterThanOrEqualAny(Vector4 left, Vector4 right) => Vector128.GreaterThanOrEqualAny(left.AsVector128(), right.AsVector128()); 636/// <inheritdoc cref="Vector128.Hypot(Vector128{float}, Vector128{float})" /> 639public static Vector4 Hypot(Vector4 x, Vector4 y) => Vector128.Hypot(x.AsVector128(), y.AsVector128()).AsVector4(); 641/// <inheritdoc cref="Vector128.IndexOf{T}(Vector128{T}, T)" /> 644public static int IndexOf(Vector4 vector, float value) => Vector128.IndexOf(vector.AsVector128(), value); 646/// <inheritdoc cref="Vector128.IndexOfWhereAllBitsSet{T}(Vector128{T})" /> 649public static int IndexOfWhereAllBitsSet(Vector4 vector) => Vector128.IndexOfWhereAllBitsSet(vector.AsVector128()); 651/// <inheritdoc cref="Vector128.IsEvenInteger{T}(Vector128{T})" /> 654public static Vector4 IsEvenInteger(Vector4 vector) => Vector128.IsEvenInteger(vector.AsVector128()).AsVector4(); 656/// <inheritdoc cref="Vector128.IsFinite{T}(Vector128{T})" /> 659public static Vector4 IsFinite(Vector4 vector) => Vector128.IsFinite(vector.AsVector128()).AsVector4(); 661/// <inheritdoc cref="Vector128.IsInfinity{T}(Vector128{T})" /> 664public static Vector4 IsInfinity(Vector4 vector) => Vector128.IsInfinity(vector.AsVector128()).AsVector4(); 666/// <inheritdoc cref="Vector128.IsInteger{T}(Vector128{T})" /> 669public static Vector4 IsInteger(Vector4 vector) => Vector128.IsInteger(vector.AsVector128()).AsVector4(); 671/// <inheritdoc cref="Vector128.IsNaN{T}(Vector128{T})" /> 674public static Vector4 IsNaN(Vector4 vector) => Vector128.IsNaN(vector.AsVector128()).AsVector4(); 676/// <inheritdoc cref="Vector128.IsNegative{T}(Vector128{T})" /> 679public static Vector4 IsNegative(Vector4 vector) => Vector128.IsNegative(vector.AsVector128()).AsVector4(); 681/// <inheritdoc cref="Vector128.IsNegativeInfinity{T}(Vector128{T})" /> 684public static Vector4 IsNegativeInfinity(Vector4 vector) => Vector128.IsNegativeInfinity(vector.AsVector128()).AsVector4(); 686/// <inheritdoc cref="Vector128.IsNormal{T}(Vector128{T})" /> 689public static Vector4 IsNormal(Vector4 vector) => Vector128.IsNormal(vector.AsVector128()).AsVector4(); 691/// <inheritdoc cref="Vector128.IsOddInteger{T}(Vector128{T})" /> 694public static Vector4 IsOddInteger(Vector4 vector) => Vector128.IsOddInteger(vector.AsVector128()).AsVector4(); 696/// <inheritdoc cref="Vector128.IsPositive{T}(Vector128{T})" /> 699public static Vector4 IsPositive(Vector4 vector) => Vector128.IsPositive(vector.AsVector128()).AsVector4(); 701/// <inheritdoc cref="Vector128.IsPositiveInfinity{T}(Vector128{T})" /> 704public static Vector4 IsPositiveInfinity(Vector4 vector) => Vector128.IsPositiveInfinity(vector.AsVector128()).AsVector4(); 706/// <inheritdoc cref="Vector128.IsSubnormal{T}(Vector128{T})" /> 709public static Vector4 IsSubnormal(Vector4 vector) => Vector128.IsSubnormal(vector.AsVector128()).AsVector4(); 711/// <inheritdoc cref="Vector128.IsZero{T}(Vector128{T})" /> 714public static Vector4 IsZero(Vector4 vector) => Vector128.IsZero(vector.AsVector128()).AsVector4(); 716/// <inheritdoc cref="Vector128.LastIndexOf{T}(Vector128{T}, T)" /> 719public static int LastIndexOf(Vector4 vector, float value) => Vector128.LastIndexOf(vector.AsVector128(), value); 721/// <inheritdoc cref="Vector128.LastIndexOfWhereAllBitsSet{T}(Vector128{T})" /> 724public static int LastIndexOfWhereAllBitsSet(Vector4 vector) => Vector128.LastIndexOfWhereAllBitsSet(vector.AsVector128()); 734/// <inheritdoc cref="Vector128.Lerp(Vector128{float}, Vector128{float}, Vector128{float})" /> 737public static Vector4 Lerp(Vector4 value1, Vector4 value2, Vector4 amount) => Vector128.Lerp(value1.AsVector128(), value2.AsVector128(), amount.AsVector128()).AsVector4(); 739/// <inheritdoc cref="Vector128.LessThan{T}(Vector128{T}, Vector128{T})" /> 742public static Vector4 LessThan(Vector4 left, Vector4 right) => Vector128.LessThan(left.AsVector128(), right.AsVector128()).AsVector4(); 744/// <inheritdoc cref="Vector128.LessThanAll{T}(Vector128{T}, Vector128{T})" /> 747public static bool LessThanAll(Vector4 left, Vector4 right) => Vector128.LessThanAll(left.AsVector128(), right.AsVector128()); 749/// <inheritdoc cref="Vector128.LessThanAny{T}(Vector128{T}, Vector128{T})" /> 752public static bool LessThanAny(Vector4 left, Vector4 right) => Vector128.LessThanAny(left.AsVector128(), right.AsVector128()); 754/// <inheritdoc cref="Vector128.LessThanOrEqual{T}(Vector128{T}, Vector128{T})" /> 757public static Vector4 LessThanOrEqual(Vector4 left, Vector4 right) => Vector128.LessThanOrEqual(left.AsVector128(), right.AsVector128()).AsVector4(); 759/// <inheritdoc cref="Vector128.LessThanOrEqualAll{T}(Vector128{T}, Vector128{T})" /> 762public static bool LessThanOrEqualAll(Vector4 left, Vector4 right) => Vector128.LessThanOrEqualAll(left.AsVector128(), right.AsVector128()); 764/// <inheritdoc cref="Vector128.LessThanOrEqualAny{T}(Vector128{T}, Vector128{T})" /> 767public static bool LessThanOrEqualAny(Vector4 left, Vector4 right) => Vector128.LessThanOrEqualAny(left.AsVector128(), right.AsVector128()); 769/// <inheritdoc cref="Vector128.Load{T}(T*)" /> 773public static unsafe Vector4 Load(float* source) => Vector128.Load(source).AsVector4(); 775/// <inheritdoc cref="Vector128.LoadAligned{T}(T*)" /> 779public static unsafe Vector4 LoadAligned(float* source) => Vector128.LoadAligned(source).AsVector4(); 781/// <inheritdoc cref="Vector128.LoadAlignedNonTemporal{T}(T*)" /> 785public static unsafe Vector4 LoadAlignedNonTemporal(float* source) => Vector128.LoadAlignedNonTemporal(source).AsVector4(); 787/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T)" /> 790public static Vector4 LoadUnsafe(ref readonly float source) => Vector128.LoadUnsafe(in source).AsVector4(); 792/// <inheritdoc cref="Vector128.LoadUnsafe{T}(ref readonly T, nuint)" /> 796public static Vector4 LoadUnsafe(ref readonly float source, nuint elementOffset) => Vector128.LoadUnsafe(in source, elementOffset).AsVector4(); 798/// <inheritdoc cref="Vector128.Log(Vector128{float})" /> 800public static Vector4 Log(Vector4 vector) => Vector128.Log(vector.AsVector128()).AsVector4(); 802/// <inheritdoc cref="Vector128.Log2(Vector128{float})" /> 804public static Vector4 Log2(Vector4 vector) => Vector128.Log2(vector.AsVector128()).AsVector4(); 806/// <inheritdoc cref="Vector128.Max{T}(Vector128{T}, Vector128{T})" /> 809public static Vector4 Max(Vector4 value1, Vector4 value2) => Vector128.Max(value1.AsVector128(), value2.AsVector128()).AsVector4(); 811/// <inheritdoc cref="Vector128.MaxMagnitude{T}(Vector128{T}, Vector128{T})" /> 814public static Vector4 MaxMagnitude(Vector4 value1, Vector4 value2) => Vector128.MaxMagnitude(value1.AsVector128(), value2.AsVector128()).AsVector4(); 816/// <inheritdoc cref="Vector128.MaxMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 819public static Vector4 MaxMagnitudeNumber(Vector4 value1, Vector4 value2) => Vector128.MaxMagnitudeNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 821/// <inheritdoc cref="Vector128.MaxNative{T}(Vector128{T}, Vector128{T})" /> 824public static Vector4 MaxNative(Vector4 value1, Vector4 value2) => Vector128.MaxNative(value1.AsVector128(), value2.AsVector128()).AsVector4(); 826/// <inheritdoc cref="Vector128.MaxNumber{T}(Vector128{T}, Vector128{T})" /> 829public static Vector4 MaxNumber(Vector4 value1, Vector4 value2) => Vector128.MaxNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 831/// <inheritdoc cref="Vector128.Min{T}(Vector128{T}, Vector128{T})" /> 834public static Vector4 Min(Vector4 value1, Vector4 value2) => Vector128.Min(value1.AsVector128(), value2.AsVector128()).AsVector4(); 836/// <inheritdoc cref="Vector128.MinMagnitude{T}(Vector128{T}, Vector128{T})" /> 839public static Vector4 MinMagnitude(Vector4 value1, Vector4 value2) => Vector128.MinMagnitude(value1.AsVector128(), value2.AsVector128()).AsVector4(); 841/// <inheritdoc cref="Vector128.MinMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 844public static Vector4 MinMagnitudeNumber(Vector4 value1, Vector4 value2) => Vector128.MinMagnitudeNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 846/// <inheritdoc cref="Vector128.MinNative{T}(Vector128{T}, Vector128{T})" /> 849public static Vector4 MinNative(Vector4 value1, Vector4 value2) => Vector128.MinNative(value1.AsVector128(), value2.AsVector128()).AsVector4(); 851/// <inheritdoc cref="Vector128.MinNumber{T}(Vector128{T}, Vector128{T})" /> 854public static Vector4 MinNumber(Vector4 value1, Vector4 value2) => Vector128.MinNumber(value1.AsVector128(), value2.AsVector128()).AsVector4(); 877/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 880public static Vector4 MultiplyAddEstimate(Vector4 left, Vector4 right, Vector4 addend) => Vector128.MultiplyAddEstimate(left.AsVector128(), right.AsVector128(), addend.AsVector128()).AsVector4(); 888/// <inheritdoc cref="Vector128.None{T}(Vector128{T}, T)" /> 891public static bool None(Vector4 vector, float value) => Vector128.None(vector.AsVector128(), value); 893/// <inheritdoc cref="Vector128.NoneWhereAllBitsSet{T}(Vector128{T})" /> 896public static bool NoneWhereAllBitsSet(Vector4 vector) => Vector128.NoneWhereAllBitsSet(vector.AsVector128()); 904/// <inheritdoc cref="Vector128.OnesComplement{T}(Vector128{T})" /> 908/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{float})" /> 911public static Vector4 RadiansToDegrees(Vector4 radians) => Vector128.RadiansToDegrees(radians.AsVector128()).AsVector4(); 913/// <inheritdoc cref="Vector128.Round(Vector128{float})" /> 915public static Vector4 Round(Vector4 vector) => Vector128.Round(vector.AsVector128()).AsVector4(); 917/// <inheritdoc cref="Vector128.Round(Vector128{float}, MidpointRounding)" /> 919public static Vector4 Round(Vector4 vector, MidpointRounding mode) => Vector128.Round(vector.AsVector128(), mode).AsVector4(); 931return Vector128.Shuffle(vector.AsVector128(), Vector128.Create(xIndex, yIndex, zIndex, wIndex)).AsVector4(); 934/// <inheritdoc cref="Vector128.Sin(Vector128{float})" /> 936public static Vector4 Sin(Vector4 vector) => Vector128.Sin(vector.AsVector128()).AsVector4(); 938/// <inheritdoc cref="Vector128.SinCos(Vector128{float})" /> 942(Vector128<float> sin, Vector128<float> cos) = Vector128.SinCos(vector.AsVector128()); 951public static Vector4 SquareRoot(Vector4 value) => Vector128.Sqrt(value.AsVector128()).AsVector4(); 960/// <inheritdoc cref="Vector128.Sum{T}(Vector128{T})" /> 963public static float Sum(Vector4 value) => Vector128.Sum(value.AsVector128()); 1048/// <inheritdoc cref="Vector128.Truncate(Vector128{float})" /> 1050public static Vector4 Truncate(Vector4 vector) => Vector128.Truncate(vector.AsVector128()).AsVector4(); 1052/// <inheritdoc cref="Vector128.Xor{T}(Vector128{T}, Vector128{T})" />
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.Extensions.cs (4)
46/// <inheritdoc cref="Vector128.ExtractMostSignificantBits{T}(Vector128{T})" /> 51/// <inheritdoc cref="Vector128.GetElement{T}(Vector128{T}, int)" /> 91/// <inheritdoc cref="Vector128.ToScalar{T}(Vector128{T})" /> 95/// <inheritdoc cref="Vector128.WithElement{T}(Vector128{T}, int, T)" />
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128_1.cs (99)
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( 345return vector ^ Vector128.Create(-0.0f).As<float, T>(); 349return vector ^ Vector128.Create(-0.0).As<double, T>(); 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\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (275)
76Vector128.Abs(vector._lower), 77Vector128.Abs(vector._upper) 91/// <inheritdoc cref="Vector128.All{T}(Vector128{T}, T)" /> 96/// <inheritdoc cref="Vector128.AllWhereAllBitsSet{T}(Vector128{T})" /> 125/// <inheritdoc cref="Vector128.Any{T}(Vector128{T}, T)" /> 130/// <inheritdoc cref="Vector128.AnyWhereAllBitsSet{T}(Vector128{T})" /> 359Vector128.Ceiling(vector._lower), 360Vector128.Ceiling(vector._upper) 379/// <inheritdoc cref="Vector128.Clamp{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 387/// <inheritdoc cref="Vector128.ClampNative{T}(Vector128{T}, Vector128{T}, Vector128{T})" /> 433Vector128.ConvertToDouble(vector._lower), 434Vector128.ConvertToDouble(vector._upper) 466Vector128.ConvertToDouble(vector._lower), 467Vector128.ConvertToDouble(vector._upper) 480Vector128.ConvertToInt32(vector._lower), 481Vector128.ConvertToInt32(vector._upper) 493Vector128.ConvertToInt32Native(vector._lower), 494Vector128.ConvertToInt32Native(vector._upper) 506Vector128.ConvertToInt64(vector._lower), 507Vector128.ConvertToInt64(vector._upper) 519Vector128.ConvertToInt64Native(vector._lower), 520Vector128.ConvertToInt64Native(vector._upper) 532Vector128.ConvertToSingle(vector._lower), 533Vector128.ConvertToSingle(vector._upper) 578Vector128.ConvertToSingle(vector._lower), 579Vector128.ConvertToSingle(vector._upper) 593Vector128.ConvertToUInt32(vector._lower), 594Vector128.ConvertToUInt32(vector._upper) 607Vector128.ConvertToUInt32Native(vector._lower), 608Vector128.ConvertToUInt32Native(vector._upper) 621Vector128.ConvertToUInt64(vector._lower), 622Vector128.ConvertToUInt64(vector._upper) 635Vector128.ConvertToUInt64Native(vector._lower), 636Vector128.ConvertToUInt64Native(vector._upper) 640/// <inheritdoc cref="Vector128.CopySign{T}(Vector128{T}, Vector128{T})" /> 660Vector128.CopySign(value._lower, sign._lower), 661Vector128.CopySign(value._upper, sign._upper) 730/// <inheritdoc cref="Vector128.Cos(Vector128{double})" /> 741Vector128.Cos(vector._lower), 742Vector128.Cos(vector._upper) 747/// <inheritdoc cref="Vector128.Cos(Vector128{float})" /> 765Vector128.Cos(vector._lower), 766Vector128.Cos(vector._upper) 771/// <inheritdoc cref="Vector128.Count{T}(Vector128{T}, T)" /> 776/// <inheritdoc cref="Vector128.CountWhereAllBitsSet{T}(Vector128{T})" /> 803Vector128<T> vector = Vector128.Create(value); 993Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 994Vector128.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1010Vector128.Create(e0, e1), 1011Vector128.Create(e2, e3) 1039Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1040Vector128.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1060Vector128.Create(e0, e1, e2, e3), 1061Vector128.Create(e4, e5, e6, e7) 1077Vector128.Create(e0, e1), 1078Vector128.Create(e2, e3) 1124Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 1125Vector128.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1145Vector128.Create(e0, e1, e2, e3), 1146Vector128.Create(e4, e5, e6, e7) 1175Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1176Vector128.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1197Vector128.Create(e0, e1, e2, e3), 1198Vector128.Create(e4, e5, e6, e7) 1215Vector128.Create(e0, e1), 1216Vector128.Create(e2, e3) 1226public static Vector256<T> Create<T>(Vector64<T> value) => Create(Vector128.Create(value, value)); 1349public static Vector256<T> CreateScalar<T>(T value) => Vector128.CreateScalar(value).ToVector256(); 1533/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{double})" /> 1545Vector128.DegreesToRadians(degrees._lower), 1546Vector128.DegreesToRadians(degrees._upper) 1551/// <inheritdoc cref="Vector128.DegreesToRadians(Vector128{float})" /> 1563Vector128.DegreesToRadians(degrees._lower), 1564Vector128.DegreesToRadians(degrees._upper) 1607Vector128.Equals(left._lower, right._lower), 1608Vector128.Equals(left._upper, right._upper) 1631return Vector128.EqualsAny(left._lower, right._lower) 1632|| Vector128.EqualsAny(left._upper, right._upper); 1635/// <inheritdoc cref="Vector128.Exp(Vector128{double})" /> 1646Vector128.Exp(vector._lower), 1647Vector128.Exp(vector._upper) 1652/// <inheritdoc cref="Vector128.Exp(Vector128{float})" /> 1670Vector128.Exp(vector._lower), 1671Vector128.Exp(vector._upper) 1714Vector128.Floor(vector._lower), 1715Vector128.Floor(vector._upper) 1734/// <inheritdoc cref="Vector128.FusedMultiplyAdd(Vector128{double}, Vector128{double}, Vector128{double})" /> 1740Vector128.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 1741Vector128.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 1745/// <inheritdoc cref="Vector128.FusedMultiplyAdd(Vector128{float}, Vector128{float}, Vector128{float})" /> 1751Vector128.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 1752Vector128.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 1810Vector128.GreaterThan(left._lower, right._lower), 1811Vector128.GreaterThan(left._upper, right._upper) 1825return Vector128.GreaterThanAll(left._lower, right._lower) 1826&& Vector128.GreaterThanAll(left._upper, right._upper); 1839return Vector128.GreaterThanAny(left._lower, right._lower) 1840|| Vector128.GreaterThanAny(left._upper, right._upper); 1854Vector128.GreaterThanOrEqual(left._lower, right._lower), 1855Vector128.GreaterThanOrEqual(left._upper, right._upper) 1869return Vector128.GreaterThanOrEqualAll(left._lower, right._lower) 1870&& Vector128.GreaterThanOrEqualAll(left._upper, right._upper); 1883return Vector128.GreaterThanOrEqualAny(left._lower, right._lower) 1884|| Vector128.GreaterThanOrEqualAny(left._upper, right._upper); 1887/// <inheritdoc cref="Vector128.Hypot(Vector128{double}, Vector128{double})" /> 1898Vector128.Hypot(x._lower, y._lower), 1899Vector128.Hypot(x._upper, y._upper) 1904/// <inheritdoc cref="Vector128.Hypot(Vector128{float}, Vector128{float})" /> 1922Vector128.Hypot(x._lower, y._lower), 1923Vector128.Hypot(x._upper, y._upper) 1928/// <inheritdoc cref="Vector128.IndexOf{T}(Vector128{T}, T)" /> 1937/// <inheritdoc cref="Vector128.IndexOfWhereAllBitsSet{T}(Vector128{T})" /> 1956/// <inheritdoc cref="Vector128.IsEvenInteger{T}(Vector128{T})" /> 1972/// <inheritdoc cref="Vector128.IsFinite{T}(Vector128{T})" /> 1988/// <inheritdoc cref="Vector128.IsInfinity{T}(Vector128{T})" /> 2000/// <inheritdoc cref="Vector128.IsInteger{T}(Vector128{T})" /> 2012/// <inheritdoc cref="Vector128.IsNaN{T}(Vector128{T})" /> 2024/// <inheritdoc cref="Vector128.IsNegative{T}(Vector128{T})" /> 2051/// <inheritdoc cref="Vector128.IsNegativeInfinity{T}(Vector128{T})" /> 2067/// <inheritdoc cref="Vector128.IsNormal{T}(Vector128{T})" /> 2083/// <inheritdoc cref="Vector128.IsOddInteger{T}(Vector128{T})" /> 2099/// <inheritdoc cref="Vector128.IsPositive{T}(Vector128{T})" /> 2126/// <inheritdoc cref="Vector128.IsPositiveInfinity{T}(Vector128{T})" /> 2142/// <inheritdoc cref="Vector128.IsSubnormal{T}(Vector128{T})" /> 2158/// <inheritdoc cref="Vector128.IsZero{T}(Vector128{T})" /> 2163/// <inheritdoc cref="Vector128.LastIndexOf{T}(Vector128{T}, T)" /> 2168/// <inheritdoc cref="Vector128.LastIndexOfWhereAllBitsSet{T}(Vector128{T})" /> 2187/// <inheritdoc cref="Vector128.Lerp(Vector128{double}, Vector128{double}, Vector128{double})" /> 2199Vector128.Lerp(x._lower, y._lower, amount._lower), 2200Vector128.Lerp(x._upper, y._upper, amount._upper) 2205/// <inheritdoc cref="Vector128.Lerp(Vector128{float}, Vector128{float}, Vector128{float})" /> 2217Vector128.Lerp(x._lower, y._lower, amount._lower), 2218Vector128.Lerp(x._upper, y._upper, amount._upper) 2234Vector128.LessThan(left._lower, right._lower), 2235Vector128.LessThan(left._upper, right._upper) 2249return Vector128.LessThanAll(left._lower, right._lower) 2250&& Vector128.LessThanAll(left._upper, right._upper); 2263return Vector128.LessThanAny(left._lower, right._lower) 2264|| Vector128.LessThanAny(left._upper, right._upper); 2278Vector128.LessThanOrEqual(left._lower, right._lower), 2279Vector128.LessThanOrEqual(left._upper, right._upper) 2293return Vector128.LessThanOrEqualAll(left._lower, right._lower) 2294&& Vector128.LessThanOrEqualAll(left._upper, right._upper); 2307return Vector128.LessThanOrEqualAny(left._lower, right._lower) 2308|| Vector128.LessThanOrEqualAny(left._upper, right._upper); 2391/// <inheritdoc cref="Vector128.Log(Vector128{double})" /> 2402Vector128.Log(vector._lower), 2403Vector128.Log(vector._upper) 2408/// <inheritdoc cref="Vector128.Log(Vector128{float})" /> 2419Vector128.Log(vector._lower), 2420Vector128.Log(vector._upper) 2425/// <inheritdoc cref="Vector128.Log2(Vector128{double})" /> 2436Vector128.Log2(vector._lower), 2437Vector128.Log2(vector._upper) 2442/// <inheritdoc cref="Vector128.Log2(Vector128{float})" /> 2453Vector128.Log2(vector._lower), 2454Vector128.Log2(vector._upper) 2459/// <inheritdoc cref="Vector128.Max{T}(Vector128{T}, Vector128{T})" /> 2471Vector128.Max(left._lower, right._lower), 2472Vector128.Max(left._upper, right._upper) 2477/// <inheritdoc cref="Vector128.MaxMagnitude{T}(Vector128{T}, Vector128{T})" /> 2489Vector128.MaxMagnitude(left._lower, right._lower), 2490Vector128.MaxMagnitude(left._upper, right._upper) 2495/// <inheritdoc cref="Vector128.MaxMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2507Vector128.MaxMagnitudeNumber(left._lower, right._lower), 2508Vector128.MaxMagnitudeNumber(left._upper, right._upper) 2513/// <inheritdoc cref="Vector128.MaxNative{T}(Vector128{T}, Vector128{T})" /> 2525Vector128.MaxNative(left._lower, right._lower), 2526Vector128.MaxNative(left._upper, right._upper) 2531/// <inheritdoc cref="Vector128.MaxNumber{T}(Vector128{T}, Vector128{T})" /> 2543Vector128.MaxNumber(left._lower, right._lower), 2544Vector128.MaxNumber(left._upper, right._upper) 2549/// <inheritdoc cref="Vector128.Min{T}(Vector128{T}, Vector128{T})" /> 2561Vector128.Min(left._lower, right._lower), 2562Vector128.Min(left._upper, right._upper) 2567/// <inheritdoc cref="Vector128.MinMagnitude{T}(Vector128{T}, Vector128{T})" /> 2579Vector128.MinMagnitude(left._lower, right._lower), 2580Vector128.MinMagnitude(left._upper, right._upper) 2585/// <inheritdoc cref="Vector128.MinMagnitudeNumber{T}(Vector128{T}, Vector128{T})" /> 2597Vector128.MinMagnitudeNumber(left._lower, right._lower), 2598Vector128.MinMagnitudeNumber(left._upper, right._upper) 2603/// <inheritdoc cref="Vector128.MinNative{T}(Vector128{T}, Vector128{T})" /> 2615Vector128.MinNative(left._lower, right._lower), 2616Vector128.MinNative(left._upper, right._upper) 2621/// <inheritdoc cref="Vector128.MinNumber{T}(Vector128{T}, Vector128{T})" /> 2633Vector128.MinNumber(left._lower, right._lower), 2634Vector128.MinNumber(left._upper, right._upper) 2671Vector128.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2672Vector128.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2676/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{double}, Vector128{double}, Vector128{double})" /> 2682Vector128.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2683Vector128.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2687/// <inheritdoc cref="Vector128.MultiplyAddEstimate(Vector128{float}, Vector128{float}, Vector128{float})" /> 2693Vector128.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2694Vector128.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2707Vector128.Narrow(lower._lower, lower._upper), 2708Vector128.Narrow(upper._lower, upper._upper) 2722Vector128.Narrow(lower._lower, lower._upper), 2723Vector128.Narrow(upper._lower, upper._upper) 2736Vector128.Narrow(lower._lower, lower._upper), 2737Vector128.Narrow(upper._lower, upper._upper) 2750Vector128.Narrow(lower._lower, lower._upper), 2751Vector128.Narrow(upper._lower, upper._upper) 2765Vector128.Narrow(lower._lower, lower._upper), 2766Vector128.Narrow(upper._lower, upper._upper) 2780Vector128.Narrow(lower._lower, lower._upper), 2781Vector128.Narrow(upper._lower, upper._upper) 2795Vector128.Narrow(lower._lower, lower._upper), 2796Vector128.Narrow(upper._lower, upper._upper) 2808/// <inheritdoc cref="Vector128.None{T}(Vector128{T}, T)" /> 2813/// <inheritdoc cref="Vector128.NoneWhereAllBitsSet{T}(Vector128{T})" /> 2840/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{double})" /> 2852Vector128.RadiansToDegrees(radians._lower), 2853Vector128.RadiansToDegrees(radians._upper) 2858/// <inheritdoc cref="Vector128.RadiansToDegrees(Vector128{float})" /> 2870Vector128.RadiansToDegrees(radians._lower), 2871Vector128.RadiansToDegrees(radians._upper) 2896Vector128.Round(vector._lower), 2897Vector128.Round(vector._upper) 2902/// <inheritdoc cref="Vector128.Round(Vector128{double})" /> 2906/// <inheritdoc cref="Vector128.Round(Vector128{float})" /> 2910/// <inheritdoc cref="Vector128.Round(Vector128{double}, MidpointRounding)" /> 2914/// <inheritdoc cref="Vector128.Round(Vector128{float}, MidpointRounding)" /> 2996Vector128.ShiftLeft(vector._lower, shiftCount._lower), 2997Vector128.ShiftLeft(vector._lower, shiftCount._upper) 3013Vector128.ShiftLeft(vector._lower, shiftCount._lower), 3014Vector128.ShiftLeft(vector._lower, shiftCount._upper) 3649/// <inheritdoc cref="Vector128.Sin(Vector128{double})" /> 3660Vector128.Sin(vector._lower), 3661Vector128.Sin(vector._upper) 3666/// <inheritdoc cref="Vector128.Sin(Vector128{float})" /> 3684Vector128.Sin(vector._lower), 3685Vector128.Sin(vector._upper) 3690/// <inheritdoc cref="Vector128.Cos(Vector128{double})" /> 3700(Vector128<double> sinLower, Vector128<double> cosLower) = Vector128.SinCos(vector._lower); 3701(Vector128<double> sinUpper, Vector128<double> cosUpper) = Vector128.SinCos(vector._upper); 3710/// <inheritdoc cref="Vector128.Cos(Vector128{float})" /> 3727(Vector128<float> sinLower, Vector128<float> cosLower) = Vector128.SinCos(vector._lower); 3728(Vector128<float> sinUpper, Vector128<float> cosUpper) = Vector128.SinCos(vector._upper); 3747Vector128.Sqrt(vector._lower), 3748Vector128.Sqrt(vector._upper) 3843T result = Vector128.Sum(vector._lower); 3844result = Scalar<T>.Add(result, Vector128.Sum(vector._upper)); 3913Vector128.Truncate(vector._lower), 3914Vector128.Truncate(vector._upper) 3919/// <inheritdoc cref="Vector128.Truncate(Vector128{double})" /> 3923/// <inheritdoc cref="Vector128.Truncate(Vector128{float})" /> 4002Vector128.WidenLower(lower), 4003Vector128.WidenUpper(lower) 4017Vector128.WidenLower(lower), 4018Vector128.WidenUpper(lower) 4032Vector128.WidenLower(lower), 4033Vector128.WidenUpper(lower) 4048Vector128.WidenLower(lower), 4049Vector128.WidenUpper(lower) 4062Vector128.WidenLower(lower), 4063Vector128.WidenUpper(lower) 4078Vector128.WidenLower(lower), 4079Vector128.WidenUpper(lower) 4094Vector128.WidenLower(lower), 4095Vector128.WidenUpper(lower) 4110Vector128.WidenLower(upper), 4111Vector128.WidenUpper(upper) 4125Vector128.WidenLower(upper), 4126Vector128.WidenUpper(upper) 4140Vector128.WidenLower(upper), 4141Vector128.WidenUpper(upper) 4156Vector128.WidenLower(upper), 4157Vector128.WidenUpper(upper) 4171Vector128.WidenLower(upper), 4172Vector128.WidenUpper(upper) 4187Vector128.WidenLower(upper), 4188Vector128.WidenUpper(upper) 4203Vector128.WidenLower(upper), 4204Vector128.WidenUpper(upper)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (1)
1266public static Vector512<T> Create<T>(Vector64<T> value) => Create(Vector128.Create(value, value));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (5)
715if (Vector128.IsHardwareAccelerated) 1420if (Vector128.IsHardwareAccelerated) 1737if (Vector128.IsHardwareAccelerated) 3647if (Vector128.IsHardwareAccelerated) 3702if (Vector128.IsHardwareAccelerated)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (13)
2370result = (TVectorDouble)(object)Vector128.ConvertToDouble((Vector128<long>)(object)vector); 2405result = (TVectorSingle)(object)Vector128.ConvertToSingle((Vector128<int>)(object)vector); 2529result = (TVector)(object)Vector128.Create(value); 2563result = (TVector)(object)Vector128.Create(value); 2613result = (TVectorSingle)(object)Vector128.Narrow(value.GetLower(), value.GetUpper()); 2658result = (TVectorSingle)(object)Vector128.Narrow((Vector128<double>)(object)lower, (Vector128<double>)(object)upper); 2700result = (TVectorUInt32)(object)Vector128.ShiftLeft( 2749result = (TVectorUInt64)(object)Vector128.ShiftLeft( 2916result = (TVectorDouble)(object)Vector128.Create(lower, upper); 2931Vector128<double> lower = Vector128.WidenLower(value); 2932Vector128<double> upper = Vector128.WidenUpper(value); 2983result = (TVectorDouble)(object)Vector128.WidenLower((Vector128<float>)(object)vector); 3023result = (TVectorDouble)(object)Vector128.WidenUpper((Vector128<float>)(object)vector);
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (43)
382Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 383Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 406Vector128<short> source0 = Vector128.LoadUnsafe(ref firstVector); 407Vector128<short> source1 = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 514Vector128<short> source0 = Vector128.LoadUnsafe(ref currentSearchSpace); 515Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.Count); 536Vector128<short> source0 = Vector128.LoadUnsafe(ref searchSpace); 537Vector128<short> source1 = Vector128.LoadUnsafe(ref secondVector); 635Vector128<byte> source0 = Vector128.LoadUnsafe(ref firstVector); 636Vector128<byte> source1 = Vector128.LoadUnsafe(ref halfVectorAwayFromEnd); 661Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 686Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 760Vector128<byte> source0 = Vector128.LoadUnsafe(ref searchSpace); 761Vector128<byte> source1 = Vector128.LoadUnsafe(ref secondVector); 788Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 811Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 907Vector128<byte> source0 = Vector128.LoadUnsafe(ref firstVector); 908Vector128<byte> source1 = Vector128.LoadUnsafe(ref halfVectorAwayFromEnd); 936Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 961Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 1035Vector128<byte> source0 = Vector128.LoadUnsafe(ref searchSpace); 1036Vector128<byte> source1 = Vector128.LoadUnsafe(ref secondVector); 1066Vector128<byte> source = Vector128.LoadUnsafe(ref currentSearchSpace); 1089Vector128<byte> source = Vector128.Create(source0, source1).AsByte(); 1134: source & Vector128.Create((byte)0xF); 1141return Vector128.Equals(source, values); 1149: source & Vector128.Create((byte)0xF); 1163Vector128<byte> bitPositions = SearchValues.ShuffleNativeModified(Vector128.Create(0x8040201008040201, 0).AsByte(), highNibbles); 1212Vector128<byte> lowNibbles = source & Vector128.Create((byte)0xF); 1215Vector128<byte> row0 = Vector128.ShuffleNative(bitmapLookup0, lowNibbles); 1216Vector128<byte> row1 = Vector128.ShuffleNative(bitmapLookup1, lowNibbles); 1218Vector128<byte> bitmask = Vector128.ShuffleNative(Vector128.Create(0x8040201008040201).AsByte(), highNibbles); 1220Vector128<byte> mask = Vector128.GreaterThan(highNibbles.AsSByte(), Vector128.Create((sbyte)0x7)).AsByte(); 1221Vector128<byte> bitsets = Vector128.ConditionalSelect(mask, row1, row0); 1223Vector128<byte> result = Vector128.Equals(bitsets & bitmask, bitmask); 1328public static uint ExtractMask(Vector128<byte> result) => ~Vector128.Equals(result, Vector128<byte>.Zero).ExtractMostSignificantBits(); 1339public static Vector128<byte> NegateIfNeeded(Vector128<byte> result) => Vector128.Equals(result, Vector128<byte>.Zero); 1368Vector128<short> lowerMin = Vector128.Min(lower, Vector128.Create((ushort)255)).AsInt16(); 1369Vector128<short> upperMin = Vector128.Min(upper, Vector128.Create((ushort)255)).AsInt16();
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (18)
219Vector128<ushort> source0 = Vector128.LoadUnsafe(ref searchSpace); 220Vector128<ushort> source1 = Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<ushort>.Count); 227sourceLower = Sse2.PackUnsignedSaturate((source0 & Vector128.Create((ushort)255)).AsInt16(), (source1 & Vector128.Create((ushort)255)).AsInt16()); 260Vector128<byte> bitPositions = Vector128.ShuffleNative(Vector128.Create(0x8040201008040201).AsByte(), shifted); 262Vector128<byte> index = values & Vector128.Create((byte)VectorizedIndexMask); 271Vector128<byte> bitMaskLower = Vector128.ShuffleNative(charMapLower, index); 272Vector128<byte> bitMaskUpper = Vector128.ShuffleNative(charMapUpper, index - Vector128.Create((byte)16)); 273Vector128<byte> mask = Vector128.GreaterThan(index, Vector128.Create((byte)15)); 274bitMask = Vector128.ConditionalSelect(mask, bitMaskUpper, bitMaskLower); 277return Vector128.Equals(bitMask & bitPositions, Vector128<byte>.Zero); 507Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 508Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count); 684Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 685Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count);
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.cs (2)
299/// 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. 311return Vector128.Shuffle(vector, indices);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (1)
539uint resultMask = (~Vector128.Equals(result, Vector128<byte>.Zero)).ExtractMostSignificantBits();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (17)
149Vector128.LoadUnsafe(ref value.GetRawStringDataAsUInt16()), 150Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref value.GetRawStringDataAsUInt16(), SecondReadByteOffset))); 155Value256 = Vector256.Create(Vector128.Create( 165Value256 = Vector256.Create(Vector128.Create(Vector64.Create( 191Vector128.LoadUnsafe(ref matchStart), 192Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset))); 198Vector128<ushort> different = Vector128.LoadUnsafe(ref matchStart) ^ Value256.GetLower(); 199different |= Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset)) ^ Value256.GetUpper(); 213Vector128.LoadUnsafe(ref matchStart), 214Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset))); 220Vector128<ushort> different = (Vector128.LoadUnsafe(ref matchStart) & ToUpperMask256.GetLower()) ^ Value256.GetLower(); 221different |= (Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref matchStart, SecondReadByteOffset)) & ToUpperMask256.GetUpper()) ^ Value256.GetUpper(); 291public static Vector128<byte> TransformInput(Vector128<byte> input) => input & Vector128.Create(unchecked((byte)~0x20)); 343Vector128<byte> subtraction = Vector128.Create((byte)(128 + 'a')); 344Vector128<byte> comparison = Vector128.Create((byte)(128 + 26)); 345Vector128<byte> caseConversion = Vector128.Create((byte)0x20); 347Vector128<byte> matches = Vector128.LessThan((input - subtraction).AsSByte(), comparison.AsSByte()).AsByte();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (4)
217Vector128<ushort> source0 = Vector128.LoadUnsafe(ref source); 218Vector128<ushort> source1 = Vector128.LoadUnsafe(ref source, (nuint)Vector128<ushort>.Count); 273: input & Vector128.Create((byte)0xF); 309return SearchValues.ShuffleNativeModified(maskLow, low) & Vector128.ShuffleNative(maskHigh, high);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (17)
83if (!Vector128.IsHardwareAccelerated || searchSpaceMinusValueTailLength < Vector128<ushort>.Count) 188Vector128<ushort> ch1 = Vector128.Create(_ch1); 189Vector128<ushort> ch2 = Vector128.Create(_ch2); 190Vector128<ushort> ch3 = Vector128.Create(_ch3); 259Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace)); 260Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 261Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 270Vector128<ushort> caseConversion = Vector128.Create(CaseConversionMask); 272Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace) & caseConversion); 273Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 274Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (1)
387if (Vector128.IsHardwareAccelerated && value.Length > 1 && value.Length <= maxLength)
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\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (28)
32if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 209Vector128<ushort> ch1 = Vector128.Create((ushort)valueHead); 210Vector128<ushort> ch2 = Vector128.Create(ch2Val); 220Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 221Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace, (nuint)offset)); 279if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.Count) 424Vector128<ushort> ch1 = Vector128.Create((ushort)value); 425Vector128<ushort> ch2 = Vector128.Create((ushort)ch2Val); 429Vector128<ushort> cmpCh1 = Vector128.Equals(ch1, Vector128.LoadUnsafe(ref searchSpace, (nuint)offset)); 430Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 543else if (Vector128.IsHardwareAccelerated) 601uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 703uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 745uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 791uint matches = Vector128.Equals(Vector128<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 813else if (Vector128.IsHardwareAccelerated) 829Vector128<ushort> compareResult = Vector128.Equals(Vector128<ushort>.Zero, search); 972else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<ushort>.Count * 2) 980Vector128<ushort> tempFirst = Vector128.LoadUnsafe(ref first); 981Vector128<ushort> tempLast = Vector128.LoadUnsafe(ref last); 991tempFirst = Vector128.Shuffle(tempFirst, Vector128.Create((ushort)7, 6, 5, 4, 3, 2, 1, 0)); 992tempLast = Vector128.Shuffle(tempLast, Vector128.Create((ushort)7, 6, 5, 4, 3, 2, 1, 0));
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\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\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (151)
1340if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 1450Vector128<T> equals, values = Vector128.Create(value); 1457equals = Vector128.Equals(values, Vector128.LoadUnsafe(ref currentSearchSpace)); 1471equals = Vector128.Equals(values, Vector128.LoadUnsafe(ref oneVectorAwayFromEnd)); 1520if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 1641Vector128<TValue> equals, values = Vector128.Create(value); 1648equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref currentSearchSpace))); 1662equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref oneVectorAwayFromEnd))); 1726if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 1869Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1); 1876current = Vector128.LoadUnsafe(ref currentSearchSpace); 1877equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current)); 1891current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 1892equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current)); 1933if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2076Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2); 2083current = Vector128.LoadUnsafe(ref currentSearchSpace); 2084equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current)); 2098current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 2099equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current)); 2125if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2236Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2), values3 = Vector128.Create(value3); 2243current = Vector128.LoadUnsafe(ref currentSearchSpace); 2244equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) 2245| Vector128.Equals(values2, current) | Vector128.Equals(values3, current)); 2259current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 2260equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) 2261| Vector128.Equals(values2, current) | Vector128.Equals(values3, current)); 2287if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2401Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), 2402values2 = Vector128.Create(value2), values3 = Vector128.Create(value3), values4 = Vector128.Create(value4); 2409current = Vector128.LoadUnsafe(ref currentSearchSpace); 2410equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current) 2411| Vector128.Equals(values3, current) | Vector128.Equals(values4, current)); 2425current = Vector128.LoadUnsafe(ref oneVectorAwayFromEnd); 2426equals = TNegator.NegateIfNeeded(Vector128.Equals(values0, current) | Vector128.Equals(values1, current) | Vector128.Equals(values2, current) 2427| Vector128.Equals(values3, current) | Vector128.Equals(values4, current)); 2453if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2573if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2712Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1); 2718current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2719equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1)); 2731current = Vector128.LoadUnsafe(ref searchSpace); 2732equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1)); 2758if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 2897Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2); 2903current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2904equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2)); 2917current = Vector128.LoadUnsafe(ref searchSpace); 2918equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2)); 2944if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3047Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2), values3 = Vector128.Create(value3); 3053current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3054equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) | Vector128.Equals(current, values3)); 3067current = Vector128.LoadUnsafe(ref searchSpace); 3068equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) | Vector128.Equals(current, values3)); 3103if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<T>.Count) 3113Debug.Assert(Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported, "Vector128 is not HW-accelerated or not supported"); 3120Vector128<T> oldValues = Vector128.Create(oldValue); 3121Vector128<T> newValues = Vector128.Create(newValue); 3126original = Vector128.LoadUnsafe(ref src, idx); 3127mask = Vector128.Equals(oldValues, original); 3128result = Vector128.ConditionalSelect(mask, newValues, original); 3140original = Vector128.LoadUnsafe(ref src, lastVectorIndex); 3141mask = Vector128.Equals(oldValues, original); 3142result = Vector128.ConditionalSelect(mask, newValues, original); 3211if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.Count) 3309Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), 3310values2 = Vector128.Create(value2), values3 = Vector128.Create(value3), values4 = Vector128.Create(value4); 3316current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3317equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) 3318| Vector128.Equals(current, values3) | Vector128.Equals(current, values4)); 3331current = Vector128.LoadUnsafe(ref searchSpace); 3332equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) 3333| Vector128.Equals(current, values3) | Vector128.Equals(current, values4)); 3520if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 3534Vector128<T> lowVector = Vector128.Create(lowInclusive); 3535Vector128<T> rangeVector = Vector128.Create(highInclusive - lowInclusive); 3544inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref current) - lowVector, rangeVector)); 3555inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref oneVectorAwayFromEnd) - lowVector, rangeVector)); 3667if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count) 3681Vector128<T> lowVector = Vector128.Create(lowInclusive); 3682Vector128<T> rangeVector = Vector128.Create(highInclusive - lowInclusive); 3690inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref searchSpace, (nuint)offset) - lowVector, rangeVector)); 3700inRangeVector = TNegator.NegateIfNeeded(Vector128.LessThanOrEqual(Vector128.LoadUnsafe(ref searchSpace) - lowVector, rangeVector)); 3802if (Vector128.IsHardwareAccelerated && length >= Vector128<T>.Count) 3836Vector128<T> targetVector = Vector128.Create(value); 3840count += BitOperations.PopCount(Vector128.Equals(Vector128.LoadUnsafe(ref current), targetVector).ExtractMostSignificantBits()); 3845uint mask = Vector128.Equals(Vector128.LoadUnsafe(ref oneVectorAwayFromEnd), targetVector).ExtractMostSignificantBits();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (11)
1314else if (Vector128.IsHardwareAccelerated && length >= (uint)Vector128<ushort>.Count) 1997if (Vector128.IsHardwareAccelerated && source.Length >= Vector128<ushort>.Count * 2) 2034if (!Vector128.IsHardwareAccelerated) 2101else if (Vector128.IsHardwareAccelerated) 2103Vector128<ushort> v1 = Vector128.Create((ushort)c); 2104Vector128<ushort> v2 = Vector128.Create((ushort)c2); 2105Vector128<ushort> v3 = Vector128.Create((ushort)c3); 2109Vector128<ushort> vector = Vector128.LoadUnsafe(ref source, offset); 2110Vector128<ushort> v1Eq = Vector128.Equals(vector, v1); 2111Vector128<ushort> v2Eq = Vector128.Equals(vector, v2); 2112Vector128<ushort> v3Eq = Vector128.Equals(vector, v3);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (25)
229if (!conversionIsWidthPreserving && !Vector128.IsHardwareAccelerated) 236if (Vector128.IsHardwareAccelerated && elementCount >= numInputElementsToConsumeEachVectorizedLoopIteration) 240Vector128<TFrom> srcVector = Vector128.LoadUnsafe(ref *pSrc); 251Vector128<TFrom> subtractionVector = Vector128.Create(conversionIsToUpper ? (SourceSignedMinValue + TFrom.CreateTruncating('a')) : (SourceSignedMinValue + TFrom.CreateTruncating('A'))); 252Vector128<TFrom> comparisionVector = Vector128.Create(SourceSignedMinValue + TFrom.CreateTruncating(26 /* A..Z or a..z */)); 253Vector128<TFrom> caseConversionVector = Vector128.Create(TFrom.CreateTruncating(0x20)); // works both directions 293srcVector = Vector128.LoadUnsafe(ref *pSrc, i); 346Debug.Assert(Vector128.IsHardwareAccelerated); 348Vector128<ulong> blockAsVectorOfUInt64 = Vector128.CreateScalarUnsafe(nextBlockAsUInt64); 351Vector128.StoreUnsafe(Vector128.WidenLower(blockAsVectorOfUInt64.AsByte()), ref *(ushort*)pDest, i); 356Vector128<uint> narrowedBlock = Vector128.Narrow(blockAsVectorOfUInt16, blockAsVectorOfUInt16).AsUInt32(); 365if (!Vector128.IsHardwareAccelerated) 405Debug.Assert(Vector128.IsHardwareAccelerated); 407Vector128<uint> blockAsVectorOfUInt32 = Vector128.CreateScalarUnsafe(nextBlockAsUInt32); 410Vector128<ulong> widenedBlock = Vector128.WidenLower(blockAsVectorOfUInt32.AsByte()).AsUInt64(); 416Vector128<ushort> narrowedBlock = Vector128.Narrow(blockAsVectorOfUInt16, blockAsVectorOfUInt16).AsUInt16(); 426if (IntPtr.Size < 8 || !Vector128.IsHardwareAccelerated) 474Vector128.StoreUnsafe(vector.As<TFrom, TTo>(), ref *pDest, elementOffset); 486Vector128.StoreUnsafe(Vector128.WidenLower(vector.AsByte()), ref *(ushort*)pDest, elementOffset); 487Vector128.StoreUnsafe(Vector128.WidenUpper(vector.AsByte()), ref *(ushort*)pDest, elementOffset + 8); 509return Vector128.LessThan(left.AsSByte(), right.AsSByte()).As<sbyte, T>(); 513return Vector128.LessThan(left.AsInt16(), right.AsInt16()).As<short, T>();
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\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (19)
52if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TLeft>.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) 474public static Vector128<T> Load128(ref T ptr) => Vector128.LoadUnsafe(ref ptr); 523Vector128<byte> vec = Vector128.CreateScalarUnsafe(Unsafe.ReadUnaligned<long>(ref ptr)).AsByte(); 528Vector128<byte> vec = Vector128.CreateScalarUnsafe(Unsafe.ReadUnaligned<long>(ref ptr)).AsByte(); 534return Vector128.Create(lower, upper); 541(Vector128<ushort> lower, Vector128<ushort> upper) = Vector128.Widen(Vector128.LoadUnsafe(ref ptr));
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (56)
215else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<byte>.Count) 217if (!VectorContainsNonAsciiChar(Vector128.Load(pBuffer))) 223byte* pFinalVectorReadPos = pBuffer + bufferLength - Vector128.Size; 224pBuffer = (byte*)(((nuint)pBuffer + Vector128.Size) & ~(nuint)(Vector128.Size - 1)); 228Debug.Assert(0 < numBytesRead && numBytesRead <= Vector128.Size, "We should've made forward progress of at least one byte."); 236Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned."); 237if (VectorContainsNonAsciiChar(Vector128.LoadAligned(pBuffer))) 242pBuffer += Vector128.Size; 376Vector128.Create((ushort)0x1001).AsByte() : 377Vector128.Create((ushort)0x0110).AsByte(); 835else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<ushort>.Count) 837const uint SizeOfVector128InChars = Vector128.Size / sizeof(ushort); // JIT will make this a const 839if (!VectorContainsNonAsciiChar(Vector128.Load((ushort*)pBuffer))) 845pBuffer = (char*)(((nuint)pBuffer + Vector128.Size) & ~(nuint)(Vector128.Size - 1)); 857Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned."); 858if (VectorContainsNonAsciiChar(Vector128.LoadAligned((ushort*)pBuffer))) 968uint SizeOfVector128InChars = Vector128.Size / sizeof(char); 992firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1006if (bufferLength < 2 * Vector128.Size) 1013pBuffer = (char*)(((nuint)pBuffer + Vector128.Size) & ~(nuint)(Vector128.Size - 1)); 1028if (bufferLength >= 2 * Vector128.Size) 1030char* pFinalVectorReadPos = (char*)((nuint)pBuffer + bufferLength - 2 * Vector128.Size); 1036firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1037secondVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer, SizeOfVector128InChars); 1059if ((bufferLength & Vector128.Size) == 0) 1067firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1079if (((byte)bufferLength & (Vector128.Size - 1)) != 0) 1084pBuffer = (char*)((byte*)pBuffer + (bufferLength & (Vector128.Size - 1)) - Vector128.Size); 1085firstVector = Vector128.LoadUnsafe(ref *(ushort*)pBuffer); 1122Vector128<ushort> asciiMaskForAddSaturate = Vector128.Create((ushort)0x7F80); 1149Vector128<ushort> largestAsciiValue = Vector128.Create((ushort)0x007F); 1284Vector128<short> vecWide = Vector128.CreateScalarUnsafe(value).AsInt16(); 1350if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= 2 * (uint)Vector128<byte>.Count) 1531return (asciiVector & Vector128.Create((byte)0x80)) != Vector128<byte>.Zero; 1551Vector128<ushort> zeroIsAscii = utf16Vector & Vector128.Create(asciiMask); 1557Vector128<ushort> asciiMaskForAddSaturate = Vector128.Create((ushort)0x7F80); 1573Vector128<ushort> zeroIsAscii = utf16Vector & Vector128.Create(asciiMask); 1618Sse41.IsSupported ? (vector.AsByte() & Vector128.Create((byte)0x80)) == Vector128<byte>.Zero : 1626(vector.AsUInt16() & Vector128.Create((ushort)0xFF80)) == Vector128<ushort>.Zero; 1686return Vector128.Narrow(vectorFirst, vectorSecond); 1721Debug.Assert(Vector128.IsHardwareAccelerated, "Vector128 is required."); 1727Vector128<ushort> utf16VectorFirst = Vector128.LoadUnsafe(ref utf16Buffer); 1757utf16VectorFirst = Vector128.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 1783utf16VectorFirst = Vector128.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 1784Vector128<ushort> utf16VectorSecond = Vector128.LoadUnsafe(ref utf16Buffer, currentOffsetInElements + SizeOfVector128 / sizeof(short)); 1934Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector128.Size == 0, "Destination should be 128-bit-aligned."); 2073if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= (uint)Vector128<byte>.Count) 2083else if (Vector128.IsHardwareAccelerated && (elementCount - currentOffset) >= (uint)Vector128<byte>.Count) 2262(Vector128<ushort> Lower128, Vector128<ushort> Upper128) = Vector128.Widen((Vector128<byte>)(object)vector); 2284else if (Vector128.IsHardwareAccelerated) 2286Vector128<byte> vecNarrow = Vector128.CreateScalar(value).AsByte(); 2287Vector128<ulong> vecWide = Vector128.WidenLower(vecNarrow).AsUInt64();
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (4)
200Vector128<ushort> latin1MaskForTestZ = Vector128.Create((ushort)0xFF00); // used for PTEST on supported hardware 201Vector128<ushort> latin1MaskForAddSaturate = Vector128.Create((ushort)0x7F00); // used for PADDUSW 783Vector128<short> latin1MaskForTestZ = Vector128.Create(unchecked((short)0xFF00)); // used for PTEST on supported hardware 784Vector128<ushort> latin1MaskForAddSaturate = Vector128.Create((ushort)0x7F00); // used for PADDUSW
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (19)
70Vector128<ushort> vector0080 = Vector128.Create((ushort)0x0080); 71Vector128<ushort> vector7800 = Vector128.Create((ushort)0x7800); 72Vector128<ushort> vectorA000 = Vector128.Create((ushort)0xA000); 79Vector128<ushort> utf16Data = Vector128.Load((ushort*)pInputBuffer); 86Vector128<ushort> charIsNonAscii = Vector128.Min(utf16Data, vector0080); 102Vector128<ushort> charIsThreeByteUtf8Encoded = Vector128.AddSaturate(utf16Data, vector7800); 138mask = Vector128.LessThan((utf16Data + vectorA000).AsInt16(), vector7800.AsInt16()).AsByte().ExtractMostSignificantBits(); 179uint mask2 = Vector128.ShiftRightLogical(utf16Data, 3).AsByte().ExtractMostSignificantBits(); 261else if (Vector128.IsHardwareAccelerated) 265Vector128<ushort> vector0080 = Vector128.Create<ushort>(0x0080); 266Vector128<ushort> vector0400 = Vector128.Create<ushort>(0x0400); 267Vector128<ushort> vector0800 = Vector128.Create<ushort>(0x0800); 268Vector128<ushort> vectorD800 = Vector128.Create<ushort>(0xD800); 290Vector128<ushort> utf16Data = Vector128.Load((ushort*)pInputBuffer); 291Vector128<ushort> twoOrMoreUtf8Bytes = Vector128.GreaterThanOrEqual(utf16Data, vector0080); 292Vector128<ushort> threeOrMoreUtf8Bytes = Vector128.GreaterThanOrEqual(utf16Data, vector0800); 318Vector128<ushort> surrogateChars = Vector128.LessThan(utf16Data, vector0800); 326Vector128<ushort> highSurrogateChars = Vector128.LessThan(utf16Data, vector0400); 327Vector128<ushort> lowSurrogateChars = Vector128.AndNot(surrogateChars, highSurrogateChars);
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\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Transcoding.cs (2)
888nonAsciiUtf16DataMask = Vector128.Create(unchecked((short)0xFF80)); // mask of non-ASCII bits in a UTF-16 char 1006utf16Data = Vector128.CreateScalarUnsafe(possibleNonAsciiQWord).AsInt16();
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (2)
131Vector128.Create((ushort)0x1001).AsByte() : 132Vector128.Create((ushort)0x0110).AsByte();
System.Private.DataContractSerialization (1)
System\Xml\XmlStreamNodeWriter.cs (1)
365if (!Vector128.IsHardwareAccelerated || (uint)charCount < 32)
System.Runtime.Intrinsics (1)
artifacts\obj\System.Runtime.Intrinsics\Debug\net10.0\System.Runtime.Intrinsics.Forwards.cs (1)
14[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Intrinsics.Vector128))]
System.Runtime.Numerics (3)
System\Numerics\NumericsHelpers.cs (3)
143while (Vector128.IsHardwareAccelerated && d.Length - offset >= Vector128<uint>.Count) 145Vector128<uint> complement = ~Vector128.LoadUnsafe(ref start, (nuint)offset); 146Vector128.StoreUnsafe(complement, ref start, (nuint)offset);