2122 references to Vector256
Microsoft.CodeAnalysis (40)
Hashing\XxHashShared.cs (40)
346if (Vector256.IsHardwareAccelerated) 348Vector256.Store(Vector256.Load(stateAccumulators), accumulators); 349Vector256.Store(Vector256.Load(stateAccumulators + 4), accumulators + 4); 403if (Vector256.IsHardwareAccelerated) 405Vector256.Store(Vector256.Create(Prime32_3, Prime64_1, Prime64_2, Prime64_3), accumulators); 406Vector256.Store(Vector256.Create(Prime64_4, Prime32_2, Prime64_5, Prime32_1), accumulators + 4); 492if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 494Vector256<ulong> seedVec = Vector256.Create(seed, 0u - seed, seed, 0u - seed); 497Vector256.Store(Vector256.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 528if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 530Vector256<ulong> acc1 = Vector256.Load(accumulators); 531Vector256<ulong> acc2 = Vector256.Load(accumulators + Vector256<ulong>.Count); 538Vector256<uint> secretVal = Vector256.Load((uint*)secret); 542secretVal = Vector256.Load((uint*)secret + Vector256<uint>.Count); 551acc1 = ScrambleAccumulator256(acc1, Vector256.Load((ulong*)secretForScramble)); 552acc2 = ScrambleAccumulator256(acc2, Vector256.Load((ulong*)secretForScramble + Vector256<ulong>.Count)); 556Vector256.Store(acc1, accumulators); 557Vector256.Store(acc2, accumulators + Vector256<ulong>.Count); 633if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 637Vector256<ulong> accVec = Accumulate256(Vector256.Load(accumulators), source, Vector256.Load((uint*)secret)); 638Vector256.Store(accVec, accumulators); 675Vector256<uint> sourceVec = Vector256.Load((uint*)source); 679Vector256<uint> sourceKeyLow = Vector256.Shuffle(sourceKey, Vector256.Create(1u, 0, 3, 0, 5, 0, 7, 0)); 680Vector256<uint> sourceSwap = Vector256.Shuffle(sourceVec, Vector256.Create(2u, 3, 0, 1, 6, 7, 4, 5)); 684(sourceKey & Vector256.Create(~0u, 0u, ~0u, 0u, ~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceKeyLow & Vector256.Create(~0u, 0u, ~0u, 0u, ~0u, 0u, ~0u, 0u)).AsUInt64(); 727if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 731Vector256<ulong> accVec = ScrambleAccumulator256(Vector256.Load(accumulators), Vector256.Load((ulong*)secret)); 732Vector256.Store(accVec, accumulators); 768Vector256<ulong> xorShift = accVec ^ Vector256.ShiftRightLogical(accVec, 47); 770accVec = xorWithKey * Vector256.Create((ulong)Prime32_1);
Microsoft.CodeAnalysis.Workspaces (40)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (40)
346if (Vector256.IsHardwareAccelerated) 348Vector256.Store(Vector256.Load(stateAccumulators), accumulators); 349Vector256.Store(Vector256.Load(stateAccumulators + 4), accumulators + 4); 403if (Vector256.IsHardwareAccelerated) 405Vector256.Store(Vector256.Create(Prime32_3, Prime64_1, Prime64_2, Prime64_3), accumulators); 406Vector256.Store(Vector256.Create(Prime64_4, Prime32_2, Prime64_5, Prime32_1), accumulators + 4); 492if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 494Vector256<ulong> seedVec = Vector256.Create(seed, 0u - seed, seed, 0u - seed); 497Vector256.Store(Vector256.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 528if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 530Vector256<ulong> acc1 = Vector256.Load(accumulators); 531Vector256<ulong> acc2 = Vector256.Load(accumulators + Vector256<ulong>.Count); 538Vector256<uint> secretVal = Vector256.Load((uint*)secret); 542secretVal = Vector256.Load((uint*)secret + Vector256<uint>.Count); 551acc1 = ScrambleAccumulator256(acc1, Vector256.Load((ulong*)secretForScramble)); 552acc2 = ScrambleAccumulator256(acc2, Vector256.Load((ulong*)secretForScramble + Vector256<ulong>.Count)); 556Vector256.Store(acc1, accumulators); 557Vector256.Store(acc2, accumulators + Vector256<ulong>.Count); 633if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 637Vector256<ulong> accVec = Accumulate256(Vector256.Load(accumulators), source, Vector256.Load((uint*)secret)); 638Vector256.Store(accVec, accumulators); 675Vector256<uint> sourceVec = Vector256.Load((uint*)source); 679Vector256<uint> sourceKeyLow = Vector256.Shuffle(sourceKey, Vector256.Create(1u, 0, 3, 0, 5, 0, 7, 0)); 680Vector256<uint> sourceSwap = Vector256.Shuffle(sourceVec, Vector256.Create(2u, 3, 0, 1, 6, 7, 4, 5)); 684(sourceKey & Vector256.Create(~0u, 0u, ~0u, 0u, ~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceKeyLow & Vector256.Create(~0u, 0u, ~0u, 0u, ~0u, 0u, ~0u, 0u)).AsUInt64(); 727if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 731Vector256<ulong> accVec = ScrambleAccumulator256(Vector256.Load(accumulators), Vector256.Load((ulong*)secret)); 732Vector256.Store(accVec, accumulators); 768Vector256<ulong> xorShift = accVec ^ Vector256.ShiftRightLogical(accVec, 47); 770accVec = xorWithKey * Vector256.Create((ulong)Prime32_1);
Microsoft.ML.CpuMath (33)
AvxIntrinsics.cs (28)
50private static readonly Vector256<float> _absMask256 = Vector256.Create(0x7FFFFFFF).AsSingle(); 85return Vector256.Create(src[idx[0]], src[idx[1]], src[idx[2]], src[idx[3]], src[idx[4]], src[idx[5]], src[idx[6]], src[idx[7]]); 139Vector256<float> signMask = Vector256.Create(-0.0f); // 0x8000 0000 283Vector256<float> x1 = Vector256.Create(pm0[col1], pm1[col1], pm2[col1], pm3[col1], 285Vector256<float> x2 = Vector256.Create(pSrcCurrent[col1]); 326Vector256<float> x01 = Vector256.Create(h01, h01); 327Vector256<float> x11 = Vector256.Create(h11, h11); 328Vector256<float> x21 = Vector256.Create(h21, h21); 329Vector256<float> x31 = Vector256.Create(h31, h31); 374x01 = Vector256.Create(h01, h01); 375x11 = Vector256.Create(h11, h11); 376x21 = Vector256.Create(h21, h21); 377x31 = Vector256.Create(h31, h31); 428Vector256<float> scalarVector256 = Vector256.Create(scalar); 469Vector256<float> scaleVector256 = Vector256.Create(scale); 580Vector256<float> scaleVector256 = Vector256.Create(scale); 625Vector256<float> a256 = Vector256.Create(a); 626Vector256<float> b256 = Vector256.Create(b); 674Vector256<float> scaleVector256 = Vector256.Create(scale); 731Vector256<float> scaleVector256 = Vector256.Create(scale); 788Vector256<float> scaleVector256 = Vector256.Create(scale); 1114Vector256<float> meanVector256 = Vector256.Create(mean); 1206Vector256<float> meanVector256 = Vector256.Create(mean); 1299Vector256<float> meanVector256 = Vector256.Create(mean); 1516Vector256<float> xPrimal256 = Vector256.Create(primalUpdate); 1517Vector256<float> xThreshold256 = Vector256.Create(threshold); 1576Vector256<float> xPrimal256 = Vector256.Create(primalUpdate); 1577Vector256<float> xThreshold = Vector256.Create(threshold);
FactorizationMachine\AvxIntrinsics.cs (5)
15private static readonly Vector256<float> _point5 = Vector256.Create(0.5f); 167Vector256<float> wei = Vector256.Create(weight); 168Vector256<float> s = Vector256.Create(slope); 169Vector256<float> lr = Vector256.Create(learningRate); 170Vector256<float> lambdav = Vector256.Create(lambdaLatent);
System.Collections (20)
System\Collections\BitArray.cs (20)
149else if (Vector256.IsHardwareAccelerated) 153Vector256<byte> vector = Vector256.LoadUnsafe(ref value, i); 154Vector256<byte> isFalse = Vector256.Equals(vector, Vector256<byte>.Zero); 357else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256<int>.Count) 361Vector256<int> result = Vector256.LoadUnsafe(ref left, i) & Vector256.LoadUnsafe(ref right, i); 430else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256<int>.Count) 434Vector256<int> result = Vector256.LoadUnsafe(ref left, i) | Vector256.LoadUnsafe(ref right, i); 504else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256<int>.Count) 508Vector256<int> result = Vector256.LoadUnsafe(ref left, i) ^ Vector256.LoadUnsafe(ref right, i); 569else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256<int>.Count) 573Vector256<int> result = ~Vector256.LoadUnsafe(ref value, i); 842Vector256<byte> upperShuffleMask_CopyToBoolArray256 = Vector256.Create(0x04040404_04040404, 0x05050505_05050505, 844Vector256<byte> lowerShuffleMask_CopyToBoolArray256 = Vector256.Create(lowerShuffleMask_CopyToBoolArray, upperShuffleMask_CopyToBoolArray); 867Vector256<byte> shuffleMask = Vector256.Create(lowerShuffleMask_CopyToBoolArray, upperShuffleMask_CopyToBoolArray); 868Vector256<byte> bitMask = Vector256.Create(0x80402010_08040201).AsByte(); 870Vector256<byte> ones = Vector256.Create((byte)1); 877Vector256<int> scalar = Vector256.Create(bits);
System.IO.Hashing (40)
System\IO\Hashing\XxHashShared.cs (40)
337if (Vector256.IsHardwareAccelerated) 339Vector256.Store(Vector256.Load(stateAccumulators), accumulators); 340Vector256.Store(Vector256.Load(stateAccumulators + 4), accumulators + 4); 394if (Vector256.IsHardwareAccelerated) 396Vector256.Store(Vector256.Create(Prime32_3, Prime64_1, Prime64_2, Prime64_3), accumulators); 397Vector256.Store(Vector256.Create(Prime64_4, Prime32_2, Prime64_5, Prime32_1), accumulators + 4); 483if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 485Vector256<ulong> seedVec = Vector256.Create(seed, 0u - seed, seed, 0u - seed); 488Vector256.Store(Vector256.Load((ulong*)(defaultSecret + i)) + seedVec, (ulong*)(destinationSecret + i)); 519if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 521Vector256<ulong> acc1 = Vector256.Load(accumulators); 522Vector256<ulong> acc2 = Vector256.Load(accumulators + Vector256<ulong>.Count); 529Vector256<uint> secretVal = Vector256.Load((uint*)secret); 533secretVal = Vector256.Load((uint*)secret + Vector256<uint>.Count); 542acc1 = ScrambleAccumulator256(acc1, Vector256.Load((ulong*)secretForScramble)); 543acc2 = ScrambleAccumulator256(acc2, Vector256.Load((ulong*)secretForScramble + Vector256<ulong>.Count)); 547Vector256.Store(acc1, accumulators); 548Vector256.Store(acc2, accumulators + Vector256<ulong>.Count); 624if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 628Vector256<ulong> accVec = Accumulate256(Vector256.Load(accumulators), source, Vector256.Load((uint*)secret)); 629Vector256.Store(accVec, accumulators); 666Vector256<uint> sourceVec = Vector256.Load((uint*)source); 670Vector256<uint> sourceKeyLow = Vector256.Shuffle(sourceKey, Vector256.Create(1u, 0, 3, 0, 5, 0, 7, 0)); 671Vector256<uint> sourceSwap = Vector256.Shuffle(sourceVec, Vector256.Create(2u, 3, 0, 1, 6, 7, 4, 5)); 675(sourceKey & Vector256.Create(~0u, 0u, ~0u, 0u, ~0u, 0u, ~0u, 0u)).AsUInt64() * (sourceKeyLow & Vector256.Create(~0u, 0u, ~0u, 0u, ~0u, 0u, ~0u, 0u)).AsUInt64(); 718if (Vector256.IsHardwareAccelerated && BitConverter.IsLittleEndian) 722Vector256<ulong> accVec = ScrambleAccumulator256(Vector256.Load(accumulators), Vector256.Load((ulong*)secret)); 723Vector256.Store(accVec, accumulators); 759Vector256<ulong> xorShift = accVec ^ Vector256.ShiftRightLogical(accVec, 47); 761accVec = xorWithKey * Vector256.Create((ulong)Prime32_1);
System.Linq (6)
System\Linq\Max.cs (1)
20public static Vector256<T> Compare(Vector256<T> left, Vector256<T> right) => Vector256.Max(left, right);
System\Linq\MaxMin.cs (4)
51else if (!Vector256.IsHardwareAccelerated || !Vector256<T>.IsSupported || span.Length < Vector256<T>.Count) 80Vector256<T> best = Vector256.LoadUnsafe(ref current); 85best = TMinMax.Compare(best, Vector256.LoadUnsafe(ref current)); 88best = TMinMax.Compare(best, Vector256.LoadUnsafe(ref lastVectorStart));
System\Linq\Min.cs (1)
20public static Vector256<T> Compare(Vector256<T> left, Vector256<T> right) => Vector256.Min(left, right);
System.Numerics.Tensors (1045)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (139)
92if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TTransformOperator.Vectorizable) 333Vector256<T> vresult = Vector256.Create(TAggregationOperator.IdentityValue); 337Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 338Vector256<T> end = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 398vector1 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0))); 399vector2 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1))); 400vector3 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2))); 401vector4 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3))); 410vector1 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4))); 411vector2 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5))); 412vector3 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6))); 413vector4 = transform.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7))); 437beg = Vector256.ConditionalSelect(CreateAlignmentMaskVector256<T>((int)misalignment), beg, Vector256.Create(TAggregationOperator.IdentityValue)); 454Vector256<T> vector = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7))); 461Vector256<T> vector = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6))); 468Vector256<T> vector = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5))); 475Vector256<T> vector = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4))); 482Vector256<T> vector = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3))); 489Vector256<T> vector = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2))); 496Vector256<T> vector = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 1))); 504end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)trailing), end, Vector256.Create(TAggregationOperator.IdentityValue)); 758Debug.Assert(Vector256.IsHardwareAccelerated); 760Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 761Vector256<T> end = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 763end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 772Debug.Assert(Vector256.IsHardwareAccelerated); 774Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 913Debug.Assert(Vector256.IsHardwareAccelerated); 915Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 916Vector256<T> end = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 918end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 927Debug.Assert(Vector256.IsHardwareAccelerated); 929Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 1019Debug.Assert(Vector256.IsHardwareAccelerated); 1021Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 1022Vector256<T> end = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 1024end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 1032Debug.Assert(Vector256.IsHardwareAccelerated); 1034Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 1104Debug.Assert(Vector256.IsHardwareAccelerated); 1106Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 1107Vector256<T> end = transform.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 1109end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 1117Debug.Assert(Vector256.IsHardwareAccelerated); 1119Vector256<T> beg = transform.Invoke(Vector256.LoadUnsafe(ref xRef)); 1211if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TBinaryOperator.Vectorizable) 1479Vector256<T> vresult = Vector256.Create(TAggregationOperator.IdentityValue); 1483Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1484Vector256.LoadUnsafe(ref yRef)); 1485Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1486Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 1552vector1 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 1553Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0))); 1554vector2 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 1555Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1))); 1556vector3 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 1557Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2))); 1558vector4 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 1559Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3))); 1568vector1 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 1569Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4))); 1570vector2 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 1571Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5))); 1572vector3 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 1573Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6))); 1574vector4 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 1575Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7))); 1601beg = Vector256.ConditionalSelect(CreateAlignmentMaskVector256<T>((int)misalignment), beg, Vector256.Create(TAggregationOperator.IdentityValue)); 1618Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 1619Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 7))); 1626Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 1627Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 6))); 1634Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 1635Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 5))); 1642Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 1643Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 4))); 1650Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 1651Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 3))); 1658Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 1659Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 2))); 1666Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 1)), 1667Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 1))); 1675end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)trailing), end, Vector256.Create(TAggregationOperator.IdentityValue)); 1954Debug.Assert(Vector256.IsHardwareAccelerated); 1956Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1957Vector256.LoadUnsafe(ref yRef)); 1958Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1959Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 1961end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 1970Debug.Assert(Vector256.IsHardwareAccelerated); 1972Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1973Vector256.LoadUnsafe(ref yRef)); 2115Debug.Assert(Vector256.IsHardwareAccelerated); 2117Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2118Vector256.LoadUnsafe(ref yRef)); 2119Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2120Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 2122end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 2131Debug.Assert(Vector256.IsHardwareAccelerated); 2133Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2134Vector256.LoadUnsafe(ref yRef)); 2227Debug.Assert(Vector256.IsHardwareAccelerated); 2229Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2230Vector256.LoadUnsafe(ref yRef)); 2231Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2232Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 2234end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 2242Debug.Assert(Vector256.IsHardwareAccelerated); 2244Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2245Vector256.LoadUnsafe(ref yRef)); 2320Debug.Assert(Vector256.IsHardwareAccelerated); 2322Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2323Vector256.LoadUnsafe(ref yRef)); 2324Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2325Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 2327end = Vector256.ConditionalSelect(CreateRemainderMaskVector256<T>((int)(remainder % (uint)Vector256<T>.Count)), end, Vector256.Create(TAggregationOperator.IdentityValue)); 2335Debug.Assert(Vector256.IsHardwareAccelerated); 2337Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2338Vector256.LoadUnsafe(ref yRef)); 2431return Vector256.LoadUnsafe( 2438return Vector256.LoadUnsafe( 2445return Vector256.LoadUnsafe( 2452return Vector256.LoadUnsafe( 2539return Vector256.LoadUnsafe( 2546return Vector256.LoadUnsafe( 2553return Vector256.LoadUnsafe( 2560return Vector256.LoadUnsafe(
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (138)
103if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TBinaryOperator.Vectorizable) 402Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 403Vector256.LoadUnsafe(ref yRef)); 404Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 405Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 459vector1 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 460Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0))); 461vector2 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 462Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1))); 463vector3 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 464Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2))); 465vector4 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 466Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3))); 475vector1 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 476Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4))); 477vector2 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 478Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5))); 479vector3 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 480Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6))); 481vector4 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 482Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7))); 505vector1 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 506Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0))); 507vector2 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 508Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1))); 509vector3 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 510Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2))); 511vector4 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 512Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3))); 521vector1 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 522Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4))); 523vector2 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 524Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5))); 525vector3 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 526Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6))); 527vector4 = TBinaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 528Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7))); 568Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8)), 569Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 8))); 576Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 577Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 7))); 584Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 585Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 6))); 592Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 593Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 5))); 600Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 601Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 4))); 608Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 609Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 3))); 616Vector256<T> vector = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 617Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 2))); 942Debug.Assert(Vector256.IsHardwareAccelerated); 944Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 945Vector256.LoadUnsafe(ref yRef)); 946Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 947Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 958Debug.Assert(Vector256.IsHardwareAccelerated); 960Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 961Vector256.LoadUnsafe(ref yRef)); 1114Debug.Assert(Vector256.IsHardwareAccelerated); 1116Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1117Vector256.LoadUnsafe(ref yRef)); 1118Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1119Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 1130Debug.Assert(Vector256.IsHardwareAccelerated); 1132Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1133Vector256.LoadUnsafe(ref yRef)); 1229Debug.Assert(Vector256.IsHardwareAccelerated); 1231Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1232Vector256.LoadUnsafe(ref yRef)); 1233Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1234Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 1244Debug.Assert(Vector256.IsHardwareAccelerated); 1246Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1247Vector256.LoadUnsafe(ref yRef)); 1319Debug.Assert(Vector256.IsHardwareAccelerated); 1321Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1322Vector256.LoadUnsafe(ref yRef)); 1323Vector256<T> end = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1324Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count)); 1334Debug.Assert(Vector256.IsHardwareAccelerated); 1336Vector256<T> beg = TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1337Vector256.LoadUnsafe(ref yRef)); 1435if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TTransformOperator.Vectorizable && TBinaryOperator.Vectorizable) 1730Vector256<T> yVec = Vector256.Create(y); 1732Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 1734Vector256<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)), 1786vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0))), 1788vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1))), 1790vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2))), 1792vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3))), 1802vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4))), 1804vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5))), 1806vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6))), 1808vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7))), 1831vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0))), 1833vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1))), 1835vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2))), 1837vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3))), 1847vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4))), 1849vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5))), 1851vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6))), 1853vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7))), 1892Vector256<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8))), 1900Vector256<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7))), 1908Vector256<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6))), 1916Vector256<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5))), 1924Vector256<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4))), 1932Vector256<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3))), 1940Vector256<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2))), 2262Debug.Assert(Vector256.IsHardwareAccelerated); 2264Vector256<T> yVec = Vector256.Create(y); 2266Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2268Vector256<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)), 2280Debug.Assert(Vector256.IsHardwareAccelerated); 2282Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2283Vector256.Create(y)); 2438Debug.Assert(Vector256.IsHardwareAccelerated); 2440Vector256<T> yVec = Vector256.Create(y); 2442Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2444Vector256<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)), 2456Debug.Assert(Vector256.IsHardwareAccelerated); 2458Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2459Vector256.Create(y)); 2557Debug.Assert(Vector256.IsHardwareAccelerated); 2559Vector256<T> yVec = Vector256.Create(y); 2561Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2563Vector256<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)), 2574Debug.Assert(Vector256.IsHardwareAccelerated); 2576Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2577Vector256.Create(y)); 2651Debug.Assert(Vector256.IsHardwareAccelerated); 2653Vector256<T> yVec = Vector256.Create(y); 2655Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2657Vector256<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)), 2668Debug.Assert(Vector256.IsHardwareAccelerated); 2670Vector256<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector256.LoadUnsafe(ref xRef)), 2671Vector256.Create(y));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (37)
42public static bool ShouldEarlyExit(Vector256<T> result) => Vector256.AnyWhereAllBitsSet(result); 74typeof(T) == typeof(float) ? Vector256.EqualsAny(result.AsUInt32(), Vector256<uint>.Zero) : 75typeof(T) == typeof(double) ? Vector256.EqualsAny(result.AsUInt64(), Vector256<ulong>.Zero) : 76Vector256.EqualsAny(result, Vector256<T>.Zero); 129if (Vector256.IsHardwareAccelerated && TOperator.Vectorizable && Vector256<T>.IsSupported) 137if (TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i)))) 148TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<T>.Count))))) 266if (Vector256.IsHardwareAccelerated && TOperator.Vectorizable && Vector256<T>.IsSupported) 290Vector256<byte> v = TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i)).AsByte(); 377if (Vector256.IsHardwareAccelerated && TOperator.Vectorizable && Vector256<T>.IsSupported) 402Vector256.Narrow( 403TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i)).AsUInt16(), 404TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + Vector256<T>.Count))).AsUInt16()); 498if (Vector256.IsHardwareAccelerated && TOperator.Vectorizable && Vector256<T>.IsSupported) 523Vector256.Narrow( 524Vector256.Narrow( 525TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i)).AsUInt32(), 526TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + Vector256<T>.Count))).AsUInt32()), 527Vector256.Narrow( 528TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector256<T>.Count)))).AsUInt32(), 529TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector256<T>.Count)))).AsUInt32())); 635if (Vector256.IsHardwareAccelerated && TOperator.Vectorizable && Vector256<T>.IsSupported) 662Vector256.Narrow( 663Vector256.Narrow( 664Vector256.Narrow( 665TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i)).AsUInt64(), 666TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + Vector256<T>.Count))).AsUInt64()), 667Vector256.Narrow( 668TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector256<T>.Count)))).AsUInt64(), 669TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector256<T>.Count)))).AsUInt64())), 670Vector256.Narrow( 671Vector256.Narrow( 672TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (4 * Vector256<T>.Count)))).AsUInt64(), 673TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (5 * Vector256<T>.Count)))).AsUInt64()), 674Vector256.Narrow( 675TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (6 * Vector256<T>.Count)))).AsUInt64(), 676TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)(i + (7 * Vector256<T>.Count)))).AsUInt64())));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs (46)
69if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TStatefulUnaryOperator.Vectorizable) 336Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 337Vector256<T> end = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 388vector1 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0))); 389vector2 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1))); 390vector3 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2))); 391vector4 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3))); 400vector1 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4))); 401vector2 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5))); 402vector3 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6))); 403vector4 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7))); 425vector1 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0))); 426vector2 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1))); 427vector3 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2))); 428vector4 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3))); 437vector1 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4))); 438vector2 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5))); 439vector3 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6))); 440vector4 = op.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7))); 478Vector256<T> vector = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8))); 485Vector256<T> vector = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7))); 492Vector256<T> vector = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6))); 499Vector256<T> vector = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5))); 506Vector256<T> vector = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4))); 513Vector256<T> vector = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3))); 520Vector256<T> vector = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2))); 814Debug.Assert(Vector256.IsHardwareAccelerated); 816Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 817Vector256<T> end = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 828Debug.Assert(Vector256.IsHardwareAccelerated); 830Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 966Debug.Assert(Vector256.IsHardwareAccelerated); 968Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 969Vector256<T> end = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 980Debug.Assert(Vector256.IsHardwareAccelerated); 982Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 1069Debug.Assert(Vector256.IsHardwareAccelerated); 1071Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 1072Vector256<T> end = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 1082Debug.Assert(Vector256.IsHardwareAccelerated); 1084Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 1151Debug.Assert(Vector256.IsHardwareAccelerated); 1153Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef)); 1154Vector256<T> end = op.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count)); 1164Debug.Assert(Vector256.IsHardwareAccelerated); 1166Vector256<T> beg = op.Invoke(Vector256.LoadUnsafe(ref xRef));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (276)
88if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported) 419Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 420Vector256.LoadUnsafe(ref yRef), 421Vector256.LoadUnsafe(ref zRef)); 422Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 423Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 424Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 481vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 482Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 483Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 0))); 484vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 485Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 486Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 1))); 487vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 488Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 489Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 2))); 490vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 491Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 492Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 3))); 501vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 502Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 503Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 4))); 504vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 505Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 506Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 5))); 507vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 508Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 509Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 6))); 510vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 511Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 512Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 7))); 536vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 537Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 538Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 0))); 539vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 540Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 541Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 1))); 542vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 543Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 544Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 2))); 545vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 546Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 547Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 3))); 556vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 557Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 558Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 4))); 559vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 560Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 561Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 5))); 562vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 563Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 564Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 6))); 565vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 566Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 567Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 7))); 609Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8)), 610Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 8)), 611Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 8))); 618Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 619Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 7)), 620Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 7))); 627Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 628Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 6)), 629Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 6))); 636Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 637Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 5)), 638Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 5))); 645Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 646Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 4)), 647Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 4))); 654Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 655Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 3)), 656Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 3))); 663Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 664Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 2)), 665Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 2))); 1021Debug.Assert(Vector256.IsHardwareAccelerated); 1023Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1024Vector256.LoadUnsafe(ref yRef), 1025Vector256.LoadUnsafe(ref zRef)); 1026Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1027Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1028Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1039Debug.Assert(Vector256.IsHardwareAccelerated); 1041Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1042Vector256.LoadUnsafe(ref yRef), 1043Vector256.LoadUnsafe(ref zRef)); 1213Debug.Assert(Vector256.IsHardwareAccelerated); 1215Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1216Vector256.LoadUnsafe(ref yRef), 1217Vector256.LoadUnsafe(ref zRef)); 1218Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1219Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1220Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1231Debug.Assert(Vector256.IsHardwareAccelerated); 1233Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1234Vector256.LoadUnsafe(ref yRef), 1235Vector256.LoadUnsafe(ref zRef)); 1340Debug.Assert(Vector256.IsHardwareAccelerated); 1342Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1343Vector256.LoadUnsafe(ref yRef), 1344Vector256.LoadUnsafe(ref zRef)); 1345Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1346Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1347Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1357Debug.Assert(Vector256.IsHardwareAccelerated); 1359Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1360Vector256.LoadUnsafe(ref yRef), 1361Vector256.LoadUnsafe(ref zRef)); 1438Debug.Assert(Vector256.IsHardwareAccelerated); 1440Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1441Vector256.LoadUnsafe(ref yRef), 1442Vector256.LoadUnsafe(ref zRef)); 1443Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1444Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1445Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1455Debug.Assert(Vector256.IsHardwareAccelerated); 1457Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1458Vector256.LoadUnsafe(ref yRef), 1459Vector256.LoadUnsafe(ref zRef)); 1563if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported) 1890Vector256<T> zVec = Vector256.Create(z); 1892Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1893Vector256.LoadUnsafe(ref yRef), 1895Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1896Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1951vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 1952Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 1954vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 1955Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 1957vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 1958Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 1960vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 1961Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 1971vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 1972Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 1974vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 1975Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 1977vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 1978Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 1980vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 1981Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 2005vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 2006Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 2008vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 2009Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 2011vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 2012Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 2014vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 2015Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 2025vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 2026Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 2028vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 2029Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 2031vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 2032Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 2034vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 2035Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 2076Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8)), 2077Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 8)), 2085Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 2086Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 7)), 2094Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 2095Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 6)), 2103Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 2104Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 5)), 2112Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 2113Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 4)), 2121Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 2122Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 3)), 2130Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 2131Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 2)), 2484Debug.Assert(Vector256.IsHardwareAccelerated); 2486Vector256<T> zVec = Vector256.Create(z); 2488Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2489Vector256.LoadUnsafe(ref yRef), 2491Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2492Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2504Debug.Assert(Vector256.IsHardwareAccelerated); 2506Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2507Vector256.LoadUnsafe(ref yRef), 2508Vector256.Create(z)); 2680Debug.Assert(Vector256.IsHardwareAccelerated); 2682Vector256<T> zVec = Vector256.Create(z); 2684Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2685Vector256.LoadUnsafe(ref yRef), 2687Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2688Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2700Debug.Assert(Vector256.IsHardwareAccelerated); 2702Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2703Vector256.LoadUnsafe(ref yRef), 2704Vector256.Create(z)); 2811Debug.Assert(Vector256.IsHardwareAccelerated); 2813Vector256<T> zVec = Vector256.Create(z); 2815Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2816Vector256.LoadUnsafe(ref yRef), 2818Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2819Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2830Debug.Assert(Vector256.IsHardwareAccelerated); 2832Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2833Vector256.LoadUnsafe(ref yRef), 2834Vector256.Create(z)); 2913Debug.Assert(Vector256.IsHardwareAccelerated); 2915Vector256<T> zVec = Vector256.Create(z); 2917Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2918Vector256.LoadUnsafe(ref yRef), 2920Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2921Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2932Debug.Assert(Vector256.IsHardwareAccelerated); 2934Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2935Vector256.LoadUnsafe(ref yRef), 2936Vector256.Create(z)); 3049if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported) 3371Vector256<T> yVec = Vector256.Create(y); 3372Vector256<T> zVec = Vector256.Create(z); 3374Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 3377Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 3430vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 3433vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 3436vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 3439vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 3450vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 3453vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 3456vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 3459vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 3483vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 3486vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 3489vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 3492vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 3503vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 3506vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 3509vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 3512vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 3552Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8)), 3561Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 3570Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 3579Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 3588Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 3597Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 3606Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 3955Debug.Assert(Vector256.IsHardwareAccelerated); 3957Vector256<T> yVec = Vector256.Create(y); 3958Vector256<T> zVec = Vector256.Create(z); 3960Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 3963Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 3976Debug.Assert(Vector256.IsHardwareAccelerated); 3978Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 3979Vector256.Create(y), 3980Vector256.Create(z)); 4153Debug.Assert(Vector256.IsHardwareAccelerated); 4155Vector256<T> yVec = Vector256.Create(y); 4156Vector256<T> zVec = Vector256.Create(z); 4158Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4161Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 4174Debug.Assert(Vector256.IsHardwareAccelerated); 4176Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4177Vector256.Create(y), 4178Vector256.Create(z)); 4286Debug.Assert(Vector256.IsHardwareAccelerated); 4288Vector256<T> yVec = Vector256.Create(y); 4289Vector256<T> zVec = Vector256.Create(z); 4291Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4294Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 4306Debug.Assert(Vector256.IsHardwareAccelerated); 4308Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4309Vector256.Create(y), 4310Vector256.Create(z)); 4390Debug.Assert(Vector256.IsHardwareAccelerated); 4392Vector256<T> yVec = Vector256.Create(y); 4393Vector256<T> zVec = Vector256.Create(z); 4395Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4398Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 4410Debug.Assert(Vector256.IsHardwareAccelerated); 4412Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4413Vector256.Create(y), 4414Vector256.Create(z));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (30)
101if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TUnaryOperator.Vectorizable) 109(Vector256<T> first, Vector256<T> second) = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref sourceRef, (uint)i)); 122(Vector256<T> first, Vector256<T> second) = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref sourceRef, (uint)i)); 254if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TOperator.Vectorizable) 262(Vector256<T> first, Vector256<T> second) = TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), Vector256.LoadUnsafe(ref yRef, (uint)i)); 273Vector256<T> mask = Vector256.Equals(CreateRemainderMaskVector256<T>(x.Length - i), Vector256<T>.Zero); 277Vector256<T> first = Vector256.ConditionalSelect(mask, 278Vector256.Create(TOperator.RemainderMaskValue), 279Vector256.LoadUnsafe(ref xRef, (uint)i)); 281Vector256<T> second = Vector256.ConditionalSelect(mask, 282Vector256.Create(TOperator.RemainderMaskValue), 283Vector256.LoadUnsafe(ref yRef, (uint)i)); 287Vector256.ConditionalSelect(mask, 288Vector256.LoadUnsafe(ref destination1Ref, (uint)i), 292Vector256.ConditionalSelect(mask, 293Vector256.LoadUnsafe(ref destination2Ref, (uint)i), 437if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && TOperator.Vectorizable) 442Vector256<T> yVec = Vector256.Create(y); 447(Vector256<T> first, Vector256<T> second) = TOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), yVec); 458Vector256<T> mask = Vector256.Equals(CreateRemainderMaskVector256<T>(x.Length - i), Vector256<T>.Zero); 462Vector256<T> first = Vector256.ConditionalSelect(mask, 463Vector256.Create(TOperator.RemainderMaskValue), 464Vector256.LoadUnsafe(ref xRef, (uint)i)); 466Vector256<T> second = Vector256.ConditionalSelect(mask, 467Vector256.Create(TOperator.RemainderMaskValue), 472Vector256.ConditionalSelect(mask, 473Vector256.LoadUnsafe(ref destination1Ref, (uint)i), 477Vector256.ConditionalSelect(mask, 478Vector256.LoadUnsafe(ref destination2Ref, (uint)i),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToFourOperator.cs (3)
81if (Vector256.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 92(Vector256<TOutput>, Vector256<TOutput>, Vector256<TOutput>, Vector256<TOutput>) results = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref sourceRef, (uint)i)); 107(Vector256<TOutput>, Vector256<TOutput>, Vector256<TOutput>, Vector256<TOutput>) results = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref sourceRef, (uint)i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs (3)
77if (Vector256.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 88(Vector256<TOutput> lower, Vector256<TOutput> upper) = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref sourceRef, (uint)i)); 101(Vector256<TOutput> lower, Vector256<TOutput> upper) = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref sourceRef, (uint)i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs (46)
109if (Vector256.IsHardwareAccelerated && Vector256<TInput>.IsSupported && Vector256<TOutput>.IsSupported && TUnaryOperator.Vectorizable && sizeof(TInput) == sizeof(TOutput)) 376Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 377Vector256<TOutput> end = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<TInput>.Count)); 428vector1 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 0))); 429vector2 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 1))); 430vector3 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 2))); 431vector4 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 3))); 440vector1 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 4))); 441vector2 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 5))); 442vector3 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 6))); 443vector4 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 7))); 465vector1 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 0))); 466vector2 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 1))); 467vector3 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 2))); 468vector4 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 3))); 477vector1 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 4))); 478vector2 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 5))); 479vector3 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 6))); 480vector4 = TUnaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<TInput>.Count * 7))); 518Vector256<TOutput> vector = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<TInput>.Count * 8))); 525Vector256<TOutput> vector = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<TInput>.Count * 7))); 532Vector256<TOutput> vector = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<TInput>.Count * 6))); 539Vector256<TOutput> vector = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<TInput>.Count * 5))); 546Vector256<TOutput> vector = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<TInput>.Count * 4))); 553Vector256<TOutput> vector = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<TInput>.Count * 3))); 560Vector256<TOutput> vector = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<TInput>.Count * 2))); 854Debug.Assert(Vector256.IsHardwareAccelerated); 856Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 857Vector256<TOutput> end = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<TInput>.Count)); 868Debug.Assert(Vector256.IsHardwareAccelerated); 870Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 1006Debug.Assert(Vector256.IsHardwareAccelerated); 1008Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 1009Vector256<TOutput> end = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<TInput>.Count)); 1020Debug.Assert(Vector256.IsHardwareAccelerated); 1022Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 1109Debug.Assert(Vector256.IsHardwareAccelerated); 1111Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 1112Vector256<TOutput> end = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<TInput>.Count)); 1122Debug.Assert(Vector256.IsHardwareAccelerated); 1124Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 1191Debug.Assert(Vector256.IsHardwareAccelerated); 1193Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef)); 1194Vector256<TOutput> end = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<TInput>.Count)); 1204Debug.Assert(Vector256.IsHardwareAccelerated); 1206Vector256<TOutput> beg = TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs (5)
77if (Vector256.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 89Vector256.LoadUnsafe(ref xRef, (uint)i), 90Vector256.LoadUnsafe(ref xRef, (uint)(i + Vector256<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i); 102Vector256.LoadUnsafe(ref xRef, (uint)i), 103Vector256.LoadUnsafe(ref xRef, (uint)(i + Vector256<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i);
System\Numerics\Tensors\netcore\TensorPrimitives.Abs.cs (4)
74Vector256<T> abs = Vector256.ConditionalSelect(Vector256.LessThan(x, Vector256<T>.Zero), -x, x); 75if (Vector256.LessThan(abs, Vector256<T>.Zero) != Vector256<T>.Zero) 81return Vector256.Abs(x);
System\Numerics\Tensors\netcore\TensorPrimitives.AcosPi.cs (1)
35public static Vector256<T> Invoke(Vector256<T> x) => AcosOperator<T>.Invoke(x) / Vector256.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Add.cs (1)
59public static T Invoke(Vector256<T> x) => Vector256.Sum(x);
System\Numerics\Tensors\netcore\TensorPrimitives.AsinPi.cs (1)
35public static Vector256<T> Invoke(Vector256<T> x) => AsinOperator<T>.Invoke(x) / Vector256.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Atan2Pi.cs (1)
76public static Vector256<T> Invoke(Vector256<T> y, Vector256<T> x) => Atan2Operator<T>.Invoke(y, x) / Vector256.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.AtanPi.cs (1)
35public static Vector256<T> Invoke(Vector256<T> x) => AtanOperator<T>.Invoke(x) / Vector256.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs (2)
50return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.AsSingle()) / Vector256.Create(3f)).As<float, T>(); 55return ExpOperator<double>.Invoke(LogOperator<double>.Invoke(x.AsDouble()) / Vector256.Create(3d)).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (2)
48return Vector256.Ceiling(x.AsSingle()).As<float, T>(); 53return Vector256.Ceiling(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Clamp.cs (3)
179public static Vector256<T> Invoke(Vector256<T> x, Vector256<T> min, Vector256<T> max) => Vector256.Clamp(x, min, max); 227public static Vector256<T> Invoke(Vector256<T> min, Vector256<T> max, Vector256<T> x) => Vector256.Clamp(x, min, max); 276public static Vector256<T> Invoke(Vector256<T> max, Vector256<T> x, Vector256<T> min) => Vector256.Clamp(x, min, max);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (46)
171public static Vector256<float> Invoke(Vector256<int> x) => Vector256.ConvertToSingle(x); 182public static Vector256<float> Invoke(Vector256<uint> x) => Vector256.ConvertToSingle(x); 193public static Vector256<double> Invoke(Vector256<ulong> x) => Vector256.ConvertToDouble(x); 204public static Vector256<double> Invoke(Vector256<long> x) => Vector256.ConvertToDouble(x); 215public static (Vector256<double> Lower, Vector256<double> Upper) Invoke(Vector256<float> x) => Vector256.Widen(x); 226public static Vector256<float> Invoke(Vector256<double> lower, Vector256<double> upper) => Vector256.Narrow(lower, upper); 237public static (Vector256<ushort> Lower, Vector256<ushort> Upper) Invoke(Vector256<byte> x) => Vector256.Widen(x); 260(Vector256<ushort> Lower, Vector256<ushort> Upper) ushorts = Vector256.Widen(x); 261(Vector256<uint> Lower, Vector256<uint> Upper) uintsLower = Vector256.Widen(ushorts.Lower); 262(Vector256<uint> Lower, Vector256<uint> Upper) uintsUpper = Vector256.Widen(ushorts.Upper); 300Vector256.ConvertToSingle(results.Item1), 301Vector256.ConvertToSingle(results.Item2), 302Vector256.ConvertToSingle(results.Item3), 303Vector256.ConvertToSingle(results.Item4) 327public static (Vector256<short> Lower, Vector256<short> Upper) Invoke(Vector256<sbyte> x) => Vector256.Widen(x); 338public static (Vector256<uint> Lower, Vector256<uint> Upper) Invoke(Vector256<ushort> x) => Vector256.Widen(x); 349public static (Vector256<int> Lower, Vector256<int> Upper) Invoke(Vector256<short> x) => Vector256.Widen(x); 360public static (Vector256<ulong> Lower, Vector256<ulong> Upper) Invoke(Vector256<uint> x) => Vector256.Widen(x); 371public static (Vector256<long> Lower, Vector256<long> Upper) Invoke(Vector256<int> x) => Vector256.Widen(x); 448(Vector256<int> lowerInt32, Vector256<int> upperInt32) = Vector256.Widen(x); 456Vector256<uint> sign = value & Vector256.Create(SingleSignMask); 462Vector256<uint> offsetExponent = bitValueInProcess & Vector256.Create(HalfExponentMask); 465Vector256<uint> subnormalMask = Vector256.Equals(offsetExponent, Vector256<uint>.Zero); 468Vector256<uint> infinityOrNaNMask = Vector256.Equals(offsetExponent, Vector256.Create(HalfExponentMask)); 471Vector256<uint> maskedExponentLowerBound = subnormalMask & Vector256.Create(ExponentLowerBound); 474Vector256<uint> offsetMaskedExponentLowerBound = Vector256.Create(ExponentOffset) | maskedExponentLowerBound; 477bitValueInProcess = Vector256.ShiftLeft(bitValueInProcess, 13); 480offsetMaskedExponentLowerBound = Vector256.ConditionalSelect(Vector256.Equals(infinityOrNaNMask, Vector256<uint>.Zero), 482Vector256.ShiftLeft(offsetMaskedExponentLowerBound, 1)); 485bitValueInProcess &= Vector256.Create(HalfToSingleBitsMask); 641return Vector256.Narrow( 650Vector256<uint> sign = Vector256.ShiftRightLogical(bitValue & Vector256.Create(SingleSignMask), 16); 653Vector256<uint> realMask = Vector256.Equals(value, value).AsUInt32(); 656value = Vector256.Abs(value); 659value = Vector256.Min(Vector256.Create(MaxHalfValueBelowInfinity), value); 662Vector256<uint> exponentOffset0 = Vector256.Max(value, Vector256.Create(MinExp).AsSingle()).AsUInt32(); 665exponentOffset0 &= Vector256.Create(SingleBiasedExponentMask); 668exponentOffset0 += Vector256.Create(Exponent13); 675Vector256<uint> maskedHalfExponentForNaN = ~realMask & Vector256.Create(ExponentMask); 678bitValue -= Vector256.Create(Exponent126); 681Vector256<uint> newExponent = Vector256.ShiftRightLogical(bitValue, 13);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (4)
61if (typeof(TTo) == typeof(int)) return Vector256.ConvertToInt32(x.AsSingle()).As<int, TTo>(); 62if (typeof(TTo) == typeof(uint)) return Vector256.ConvertToUInt32(x.AsSingle()).As<uint, TTo>(); 67if (typeof(TTo) == typeof(long)) return Vector256.ConvertToInt64(x.AsDouble()).As<long, TTo>(); 68if (typeof(TTo) == typeof(ulong)) return Vector256.ConvertToUInt64(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (4)
61if (typeof(TTo) == typeof(int)) return Vector256.ConvertToInt32Native(x.AsSingle()).As<int, TTo>(); 62if (typeof(TTo) == typeof(uint)) return Vector256.ConvertToUInt32Native(x.AsSingle()).As<uint, TTo>(); 67if (typeof(TTo) == typeof(long)) return Vector256.ConvertToInt64Native(x.AsDouble()).As<long, TTo>(); 68if (typeof(TTo) == typeof(ulong)) return Vector256.ConvertToUInt64Native(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (10)
110public static Vector256<int> Invoke(Vector256<float> x) => Vector256.ConvertToInt32(x); 121public static Vector256<uint> Invoke(Vector256<float> x) => Vector256.ConvertToUInt32(x); 132public static Vector256<ulong> Invoke(Vector256<double> x) => Vector256.ConvertToUInt64(x); 143public static Vector256<long> Invoke(Vector256<double> x) => Vector256.ConvertToInt64(x); 154public static Vector256<byte> Invoke(Vector256<ushort> lower, Vector256<ushort> upper) => Vector256.Narrow(lower, upper); 165public static Vector256<sbyte> Invoke(Vector256<short> lower, Vector256<short> upper) => Vector256.Narrow(lower, upper); 176public static Vector256<ushort> Invoke(Vector256<uint> lower, Vector256<uint> upper) => Vector256.Narrow(lower, upper); 187public static Vector256<short> Invoke(Vector256<int> lower, Vector256<int> upper) => Vector256.Narrow(lower, upper); 198public static Vector256<uint> Invoke(Vector256<ulong> lower, Vector256<ulong> upper) => Vector256.Narrow(lower, upper); 209public static Vector256<int> Invoke(Vector256<long> lower, Vector256<long> upper) => Vector256.Narrow(lower, upper);
System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs (1)
83return Vector256.CopySign(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (2)
98return Vector256.Cos(x.AsDouble()).As<double, T>(); 103return Vector256.Cos(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (8)
100Vector256<float> y = Vector256.Abs(x); 101Vector256<float> z = ExpOperator<float>.Invoke(y - Vector256.Create((float)Single_LOGV)); 102return (Vector256.Create((float)Single_HALFV) * (z + (Vector256.Create((float)Single_INVV2) / z))).As<float, T>(); 109Vector256<double> y = Vector256.Abs(x); 110Vector256<double> z = ExpOperator<double>.Invoke(y - Vector256.Create(Double_LOGV)); 111return (Vector256.Create(Double_HALFV) * (z + (Vector256.Create(Double_INVV2) / z))).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (8)
98if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && x.Length >= Vector256<T>.Count) 112Vector256<T> xVec = Vector256.LoadUnsafe(ref xRef, (uint)i); 113Vector256<T> yVec = Vector256.LoadUnsafe(ref yRef, (uint)i); 126Vector256<T> xVec = Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<T>.Count)); 127Vector256<T> yVec = Vector256.LoadUnsafe(ref yRef, (uint)(x.Length - Vector256<T>.Count)); 140Vector256.Sum(dotProductVector) / 141(T.Sqrt(Vector256.Sum(xSumOfSquaresVector)) * T.Sqrt(Vector256.Sum(ySumOfSquaresVector)));
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (7)
66Vector256<T> xpi = x * Vector256.Create(T.Pi); 70if (Vector256.GreaterThanAny(xpi.AsUInt32() & Vector256.Create(CosOperatorSingle.SignMask), Vector256.Create(CosOperatorSingle.MaxVectorizedValue))) 78if (Vector256.GreaterThanAny(xpi.AsUInt64() & Vector256.Create(CosOperatorDouble.SignMask), Vector256.Create(CosOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (2)
54return Vector256.DegreesToRadians(x.AsDouble()).As<double, T>(); 59return Vector256.DegreesToRadians(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Divide.cs (1)
73|| (Vector256.IsHardwareAccelerated && typeof(T) == typeof(int));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (2)
72return Vector256.Exp(x.AsDouble()).As<double, T>(); 77return Vector256.Exp(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs (1)
38public static Vector256<T> Invoke(Vector256<T> x) => ExpOperator<T>.Invoke(x * Vector256.Create(T.CreateTruncating(NaturalLog10)));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs (1)
38public static Vector256<T> Invoke(Vector256<T> x) => ExpOperator<T>.Invoke(x * Vector256.Create(T.CreateTruncating(NaturalLog2)));
System\Numerics\Tensors\netcore\TensorPrimitives.FloatHelpers.cs (6)
14Vector256.Create(ApplyScalar<TOperator>(floats.GetLower()), ApplyScalar<TOperator>(floats.GetUpper())); 23Vector256.Create(ApplyScalar<TOperator>(doubles.GetLower()), ApplyScalar<TOperator>(doubles.GetUpper())); 49Vector256.Create(firstLower, firstUpper), 50Vector256.Create(secondLower, secondUpper) 85Vector256.Create(firstLower, firstUpper), 86Vector256.Create(secondLower, secondUpper)
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (2)
48return Vector256.Floor(x.AsSingle()).As<float, T>(); 53return Vector256.Floor(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (2)
159return Vector256.FusedMultiplyAdd(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 164return Vector256.FusedMultiplyAdd(x.AsSingle(), y.AsSingle(), z.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (7)
77if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && x.Length >= Vector256<T>.Count) 120Vector256<T> xVec = Vector256.LoadUnsafe(ref xRef, (uint)i); 121Vector256<T> yVec = Vector256.LoadUnsafe(ref yRef, (uint)i); 123count += BitOperations.PopCount((~Vector256.Equals(xVec, yVec)).ExtractMostSignificantBits()); 132Vector256<T> xVec = Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<T>.Count)); 133Vector256<T> yVec = Vector256.LoadUnsafe(ref yRef, (uint)(x.Length - Vector256<T>.Count)); 139count += BitOperations.PopCount((~Vector256.Equals(xVec, yVec)).ExtractMostSignificantBits());
System\Numerics\Tensors\netcore\TensorPrimitives.Hypot.cs (2)
58return Vector256.Hypot(x.AsDouble(), y.AsDouble()).As<double, T>(); 63return Vector256.Hypot(x.AsSingle(), y.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (19)
63Vector256<T> useResult = Vector256.GreaterThan(result, current); 64Vector256<T> equalMask = Vector256.Equals(result, current); 73Vector256<T> sameSign = Vector256.Equals(IsNegative(result).AsInt32(), currentNegative.AsInt32()).As<int, T>(); 239if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && x.Length >= Vector256<T>.Count) 245sizeof(T) == sizeof(long) ? Vector256.Create((long)i).As<long, T>() : 246sizeof(T) == sizeof(int) ? Vector256.Create(i).As<int, T>() : 247sizeof(T) == sizeof(short) ? Vector256.Create((short)i).As<short, T>() : 248Vector256.Create((byte)i).As<byte, T>(); 268Vector256<T> result = Vector256.LoadUnsafe(ref xRef); 274nanMask = ~Vector256.Equals(result, result); 288current = Vector256.LoadUnsafe(ref xRef, (uint)i); 293nanMask = ~Vector256.Equals(current, current); 308current = Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<T>.Count)); 313nanMask = ~Vector256.Equals(current, current); 454sizeof(T) == sizeof(long) ? Vector256.LessThan(indices1.AsInt64(), indices2.AsInt64()).As<long, T>() : 455sizeof(T) == sizeof(int) ? Vector256.LessThan(indices1.AsInt32(), indices2.AsInt32()).As<int, T>() : 456sizeof(T) == sizeof(short) ? Vector256.LessThan(indices1.AsInt16(), indices2.AsInt16()).As<short, T>() : 457Vector256.LessThan(indices1.AsByte(), indices2.AsByte()).As<byte, T>(); 500return Vector256.ConditionalSelect(mask, left, right);
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMaxMagnitude.cs (5)
61Vector256<T> resultMag = Vector256.Abs(result), currentMag = Vector256.Abs(current); 62Vector256<T> useResult = Vector256.GreaterThan(resultMag, currentMag); 63Vector256<T> equalMask = Vector256.Equals(resultMag, currentMag); 72Vector256<T> sameSign = Vector256.Equals(IsNegative(result).AsInt32(), currentNegative.AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMin.cs (3)
60Vector256<T> useResult = Vector256.LessThan(result, current); 61Vector256<T> equalMask = Vector256.Equals(result, current); 70Vector256<T> sameSign = Vector256.Equals(resultNegative.AsInt32(), IsNegative(current).AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMinMagnitude.cs (5)
61Vector256<T> resultMag = Vector256.Abs(result), currentMag = Vector256.Abs(current); 62Vector256<T> useResult = Vector256.LessThan(resultMag, currentMag); 63Vector256<T> equalMask = Vector256.Equals(resultMag, currentMag); 72Vector256<T> sameSign = Vector256.Equals(resultNegative.AsInt32(), IsNegative(current).AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IsEvenInteger.cs (1)
58public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsEvenInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsFinite.cs (1)
76public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsFinite(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInfinity.cs (1)
63public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInteger.cs (1)
73public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNegativeInfinity.cs (1)
63public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsNegativeInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNormal.cs (1)
58public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsNormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsOddInteger.cs (1)
58public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsOddInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPositiveInfinity.cs (1)
63public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsPositiveInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPow2.cs (2)
62Vector256.Equals(x & (x - Vector256<T>.One), Vector256<T>.Zero) & 63Vector256.GreaterThan(x, Vector256<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.IsSubnormal.cs (1)
63public static Vector256<T> Invoke(Vector256<T> x) => Vector256.IsSubnormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsZero.cs (1)
54public static Vector256<T> Invoke(Vector256<T> x) => Vector256.Equals(x, Vector256<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (4)
96Vector256.Create((byte)8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 98Vector256<byte> nibbleMask = Vector256.Create<byte>(0xF); 111Vector256<uint> lowHalf = Vector256.Create((uint)0x0000FFFF); 131return Vector256.Create(Invoke(x.GetLower()), Invoke(x.GetUpper()));
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (2)
102return Vector256.Lerp(x.AsDouble(), y.AsDouble(), amount.AsDouble()).As<double, T>(); 107return Vector256.Lerp(x.AsSingle(), y.AsSingle(), amount.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (2)
114return Vector256.Log(x.AsDouble()).As<double, T>(); 119return Vector256.Log(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (1)
42public static Vector256<T> Invoke(Vector256<T> x) => LogOperator<T>.Invoke(x) / Vector256.Create(T.CreateTruncating(NaturalLog10));
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (2)
74return Vector256.Log2(x.AsDouble()).As<double, T>(); 79return Vector256.Log2(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (11)
120return Vector256.Max(x, y); 165return Vector256.IsNaN(vector); 225return Vector256.IsNegative(vector); 315return Vector256.IsPositive(vector); 453if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && x.Length >= Vector256<T>.Count) 459Vector256<T> result = Vector256.LoadUnsafe(ref xRef, 0); 466nanMask = ~Vector256.Equals(result, result); 480current = Vector256.LoadUnsafe(ref xRef, (uint)i); 485nanMask = ~Vector256.Equals(current, current); 499current = Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<T>.Count)); 505nanMask = ~Vector256.Equals(current, current);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs (1)
100return Vector256.MaxMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitudeNumber.cs (1)
136return Vector256.MaxMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxNumber.cs (1)
109return Vector256.MaxNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs (1)
118return Vector256.Min(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs (1)
111return Vector256.MinMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitudeNumber.cs (1)
135return Vector256.MinMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinNumber.cs (1)
109return Vector256.MinNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (2)
162return Vector256.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 166return Vector256.MultiplyAddEstimate(x.AsSingle(), y.AsSingle(), z.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (11)
140Vector256<byte> c1 = Vector256.Create((byte)0x55); 141Vector256<byte> c2 = Vector256.Create((byte)0x33); 142Vector256<byte> c3 = Vector256.Create((byte)0x0F); 156Vector256<ushort> c1 = Vector256.Create((ushort)0x5555); 157Vector256<ushort> c2 = Vector256.Create((ushort)0x3333); 158Vector256<ushort> c3 = Vector256.Create((ushort)0x0F0F); 159Vector256<ushort> c4 = Vector256.Create((ushort)0x0101); 170Vector256<uint> c1 = Vector256.Create(0x55555555u); 171Vector256<uint> c2 = Vector256.Create(0x33333333u); 172Vector256<uint> c3 = Vector256.Create(0x0F0F0F0Fu); 173Vector256<uint> c4 = Vector256.Create(0x01010101u);
System\Numerics\Tensors\netcore\TensorPrimitives.RadiansToDegrees.cs (2)
54return Vector256.RadiansToDegrees(x.AsDouble()).As<double, T>(); 59return Vector256.RadiansToDegrees(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (2)
86public static Vector256<T> Invoke(Vector256<T> x) => Vector256<T>.One / Vector256.Sqrt(x); 205return Vector256<T>.One / Vector256.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs (2)
52return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.AsSingle()) / Vector256.Create((float)_n)).As<float, T>(); 57return ExpOperator<double>.Invoke(LogOperator<double>.Invoke(x.AsDouble()) / Vector256.Create((double)_n)).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (8)
203return Vector256.Round(x.AsDouble()).As<double, T>(); 208return Vector256.Round(x.AsSingle()).As<float, T>(); 271return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector256.Create(0.49999997f), x.AsSingle())).As<float, T>(); 276return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector256.Create(0.49999999999999994), x.AsDouble())).As<double, T>(); 330Vector256<T> limit = Vector256.Create(typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit)); 331return Vector256.ConditionalSelect(Vector256.LessThan(Vector256.Abs(x), limit),
System\Numerics\Tensors\netcore\TensorPrimitives.ScaleB.cs (1)
35public Vector256<T> Invoke(Vector256<T> x) => x * Vector256.Create(_pow2n);
System\Numerics\Tensors\netcore\TensorPrimitives.Sigmoid.cs (2)
42public static Vector256<T> Invoke(Vector256<T> x) => Vector256.Create(T.One) / (Vector256.Create(T.One) + ExpOperator<T>.Invoke(-x));
System\Numerics\Tensors\netcore\TensorPrimitives.Sign.cs (8)
68return Vector256.ConditionalSelect(Vector256.Equals(x, Vector256<T>.Zero).AsInt32(), 79if (Vector256.EqualsAny(IsNaN(x).AsInt32(), Vector256<int>.AllBitsSet)) 84return Vector256.ConditionalSelect(Vector256.LessThan(x, Vector256<T>.Zero).AsInt32(), 85Vector256.Create(-1), 86Vector256.ConditionalSelect(Vector256.GreaterThan(x, Vector256<T>.Zero).AsInt32(),
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (2)
88return Vector256.Sin(x.AsDouble()).As<double, T>(); 93return Vector256.Sin(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (10)
86Vector256<float> y = Vector256.Abs(x); 87Vector256<float> z = ExpOperator<float>.Invoke(y - Vector256.Create((float)Single_LOGV)); 88Vector256<float> result = Vector256.Create((float)Single_HALFV) * (z - (Vector256.Create((float)Single_INVV2) / z)); 89Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 97Vector256<double> y = Vector256.Abs(x); 98Vector256<double> z = ExpOperator<double>.Invoke(y - Vector256.Create(Double_LOGV)); 99Vector256<double> result = Vector256.Create(Double_HALFV) * (z - (Vector256.Create(Double_INVV2) / z)); 100Vector256<ulong> sign = x.AsUInt64() & Vector256.Create(~(ulong)long.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (7)
66Vector256<T> xpi = x * Vector256.Create(T.Pi); 70if (Vector256.GreaterThanAny(xpi.AsUInt32() & Vector256.Create(SinOperatorSingle.SignMask), Vector256.Create(SinOperatorSingle.MaxVectorizedValue))) 78if (Vector256.GreaterThanAny(xpi.AsUInt64() & Vector256.Create(SinOperatorDouble.SignMask), Vector256.Create(SinOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.Sqrt.cs (1)
31public static Vector256<T> Invoke(Vector256<T> x) => Vector256.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
57Vector256<T> diff = x - Vector256.Create(_subtrahend);
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (47)
158Vector256<float> uxMasked = Vector256.Abs(x); 159if (Vector256.GreaterThanAny(uxMasked.AsUInt32(), Vector256.Create(MaxVectorizedValue))) 164Vector256<float> dn = MultiplyAddEstimateOperator<float>.Invoke(uxMasked, Vector256.Create(2 / float.Pi), Vector256.Create(AlmHuge)); 166dn -= Vector256.Create(AlmHuge); 169f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector256.Create(-float.Pi / 2), f); 170f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector256.Create(Pi_Tail2), f); 171f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector256.Create(Pi_Tail3), f); 178Vector256<float> a1 = MultiplyAddEstimateOperator<float>.Invoke(Vector256.Create(C2), f2, Vector256.Create(C1)); 179Vector256<float> a2 = MultiplyAddEstimateOperator<float>.Invoke(Vector256.Create(C4), f2, Vector256.Create(C3)); 180Vector256<float> a3 = MultiplyAddEstimateOperator<float>.Invoke(Vector256.Create(C6), f2, Vector256.Create(C5)); 182Vector256<float> b2 = MultiplyAddEstimateOperator<float>.Invoke(f8, a3, f12 * Vector256.Create(C7)); 185Vector256<float> result = (poly.AsUInt32() ^ (x.AsUInt32() & Vector256.Create(~SignMask))).AsSingle(); 186return Vector256.ConditionalSelect(Vector256.Equals(odd, Vector256<uint>.Zero).AsSingle(), 188Vector256.Create(-1f) / result); 303Vector256<double> uxMasked = Vector256.Abs(x); 304if (Vector256.GreaterThanAny(uxMasked.AsUInt64(), Vector256.Create(MaxVectorizedValue))) 310Vector256<double> dn = MultiplyAddEstimateOperator<double>.Invoke(uxMasked, Vector256.Create(2 / double.Pi), Vector256.Create(AlmHuge)); 312dn -= Vector256.Create(AlmHuge); 316f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector256.Create(-double.Pi / 2), f); 317f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector256.Create(-HalfPi2), f); 318f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector256.Create(-HalfPi3), f); 329Vector256<double> a1 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C3), g, Vector256.Create(C1)); 330Vector256<double> a2 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C7), g, Vector256.Create(C5)); 331Vector256<double> a3 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C11), g, Vector256.Create(C9)); 332Vector256<double> a4 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C15), g, Vector256.Create(C13)); 333Vector256<double> a5 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C19), g, Vector256.Create(C17)); 334Vector256<double> a6 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C23), g, Vector256.Create(C21)); 335Vector256<double> a7 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C27), g, Vector256.Create(C25)); 342Vector256<double> result = (poly.AsUInt64() ^ (x.AsUInt64() & Vector256.Create(~SignMask))).AsDouble(); 343return Vector256.ConditionalSelect(Vector256.Equals(odd, Vector256<ulong>.Zero).AsDouble(), 345Vector256.Create(-1.0) / result);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (8)
91Vector256<float> y = Vector256.Abs(x); 92Vector256<float> z = ExpM1Operator<float>.Invoke(Vector256.Create(-2f) * y); 93Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 94return (sign ^ (-z / (z + Vector256.Create(2f))).AsUInt32()).As<uint, T>(); 100Vector256<double> y = Vector256.Abs(x); 101Vector256<double> z = ExpM1Operator<double>.Invoke(Vector256.Create(-2d) * y); 102Vector256<ulong> sign = x.AsUInt64() & Vector256.Create(~(ulong)long.MaxValue); 103return (sign ^ (-z / (z + Vector256.Create(2d))).AsUInt64()).As<ulong, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.TrailingZeroCount.cs (1)
56return Vector256.Create(Invoke(x.GetLower()), Invoke(x.GetUpper()));
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
74return Vector256.Truncate(x.AsDouble()).As<double, T>(); 79return Vector256.Truncate(x.AsSingle()).As<float, T>();
System.Private.CoreLib (894)
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (12)
254Vector256.ShiftLeft(vector, 8) | Vector256.ShiftRightLogical(vector, 8); 268Vector256.Shuffle(vector.AsByte(), Vector256.Create((byte)3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12, 19, 18, 17, 16, 23, 22, 21, 20, 27, 26, 25, 24, 31, 30, 29, 28)).AsInt32(); 282Vector256.Shuffle(vector.AsByte(), Vector256.Create((byte)7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 23, 22, 21, 20, 19, 18, 17, 16, 31, 30, 29, 28, 27, 26, 25, 24)).AsInt64(); 308if (Vector256.IsHardwareAccelerated) 312Vector256.StoreUnsafe(TReverser.Reverse(Vector256.LoadUnsafe(ref sourceRef, (uint)i)), ref destRef, (uint)i); 340if (Vector256.IsHardwareAccelerated) 345Vector256.StoreUnsafe(TReverser.Reverse(Vector256.LoadUnsafe(ref sourceRef, (uint)i)), ref destRef, (uint)i);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (9)
732Vector256<sbyte> lutHi = Vector256.Create(decoder.Avx2LutHigh); 734Vector256<sbyte> lutLo = Vector256.Create(decoder.Avx2LutLow); 736Vector256<sbyte> lutShift = Vector256.Create(decoder.Avx2LutShift); 738Vector256<sbyte> packBytesInLaneMask = Vector256.Create( 748Vector256<int> packLanesControl = Vector256.Create( 758Vector256<sbyte> maskSlashOrUnderscore = Vector256.Create((sbyte)decoder.MaskSlashOrUnderscore); 759Vector256<sbyte> shiftForUnderscore = Vector256.Create((sbyte)33); 760Vector256<sbyte> mergeConstant0 = Vector256.Create(0x01400140).AsSByte(); 761Vector256<short> mergeConstant1 = Vector256.Create(0x00011000).AsInt16();
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (9)
232Vector256<sbyte> shuffleVec = Vector256.Create( 242Vector256<sbyte> lut = Vector256.Create( 252Vector256<sbyte> maskAC = Vector256.Create(0x0fc0fc00).AsSByte(); 253Vector256<sbyte> maskBB = Vector256.Create(0x003f03f0).AsSByte(); 254Vector256<ushort> shiftAC = Vector256.Create(0x04000040).AsUInt16(); 255Vector256<short> shiftBB = Vector256.Create(0x01000010).AsInt16(); 256Vector256<byte> const51 = Vector256.Create((byte)51); 257Vector256<sbyte> const25 = Vector256.Create((sbyte)25); 267str = Avx2.PermuteVar8x32(str.AsInt32(), Vector256.Create(
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (4)
549Vector256<sbyte> below = Vector256.LessThan(str, lowerBound); 550Vector256<sbyte> above = Vector256.GreaterThan(str, upperBound); 551Vector256<sbyte> eq5F = Vector256.Equals(str, maskSlashOrUnderscore); 554Vector256<sbyte> outside = Vector256.AndNot(below | above, eq5F);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (1)
394(Vector256<ushort> utf16LowVector, Vector256<ushort> utf16HighVector) = Vector256.Widen(str);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
2499if (Vector256.IsHardwareAccelerated) 2507(Vector256<ushort> utf16Lower, Vector256<ushort> utf16Upper) = Vector256.Widen(Vector256.LoadUnsafe(ref src));
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (12)
170if (Vector256.IsHardwareAccelerated && length >= Vector256<ushort>.Count) 455if (Vector256.IsHardwareAccelerated && searchSpaceMinusValueTailLength - Vector256<ushort>.Count >= 0) 458Vector256<ushort> ch1 = Vector256.Create((ushort)valueChar); 459Vector256<ushort> ch2 = Vector256.Create((ushort)valueCharU); 470Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.BitwiseOr(Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance)), Vector256.Create((ushort)0x20))); 471Vector256<ushort> cmpCh1 = Vector256.Equals(ch1, Vector256.BitwiseOr(Vector256.LoadUnsafe(ref searchSpace, (nuint)offset), Vector256.Create((ushort)0x20)));
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (8)
388return Vector256.ConvertToDouble(value.AsVector256()).AsVector(); 411return Vector256.ConvertToDouble(value.AsVector256()).AsVector(); 519return Vector256.ConvertToSingle(value.AsVector256()).AsVector(); 686return Vector256.Count(vector.AsVector256(), value); 1343return Vector256.IndexOf(vector.AsVector256(), value); 1589return Vector256.LastIndexOf(vector.AsVector256(), value); 2681return Vector256.ShiftLeft(vector.AsVector256(), shiftCount.AsVector256()).AsVector(); 2707return Vector256.ShiftLeft(vector.AsVector256(), shiftCount.AsVector256()).AsVector();
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (5)
726if (Vector256.IsHardwareAccelerated) 1552if (Vector256.IsHardwareAccelerated) 1806if (Vector256.IsHardwareAccelerated) 3620if (Vector256.IsHardwareAccelerated) 3664if (Vector256.IsHardwareAccelerated)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256_1.cs (99)
30[StructLayout(LayoutKind.Sequential, Size = Vector256.Size)] 41get => Vector256.Create(Scalar<T>.AllBitsSet); 52return Vector256.Size / sizeof(T); 104get => Vector256.Create(Scalar<T>.One); 137return Vector256.Create( 152return Vector256.Create( 167return Vector256.Create( 182return Vector256.Create( 196return Vector256.Create( 224return Vector256.Create( 246return Vector256.Create( 261return Vector256.Create( 276return Vector256.Create( 298return Vector256.Create( 312return Vector256.Create( 327return Vector256.Create( 343return vector ^ Vector256.Create(-0.0f).As<float, T>(); 347return vector ^ Vector256.Create(-0.0).As<double, T>(); 374return Vector256.Create( 395if (Vector256.IsHardwareAccelerated) 399Vector256<T> result = Vector256.Equals(this, other) | ~(Vector256.Equals(this, this) | Vector256.Equals(other, other)); 461static int ISimdVector<Vector256<T>, T>.Alignment => Vector256.Alignment; 470get => Vector256.IsHardwareAccelerated; 475static Vector256<T> ISimdVector<Vector256<T>, T>.Abs(Vector256<T> vector) => Vector256.Abs(vector); 483static bool ISimdVector<Vector256<T>, T>.All(Vector256<T> vector, T value) => Vector256.All(vector, value); 487static bool ISimdVector<Vector256<T>, T>.AllWhereAllBitsSet(Vector256<T> vector) => Vector256.AllWhereAllBitsSet(vector); 491static Vector256<T> ISimdVector<Vector256<T>, T>.AndNot(Vector256<T> left, Vector256<T> right) => Vector256.AndNot(left, right); 495static bool ISimdVector<Vector256<T>, T>.Any(Vector256<T> vector, T value) => Vector256.Any(vector, value); 499static bool ISimdVector<Vector256<T>, T>.AnyWhereAllBitsSet(Vector256<T> vector) => Vector256.AnyWhereAllBitsSet(vector); 511static Vector256<T> ISimdVector<Vector256<T>, T>.Ceiling(Vector256<T> vector) => Vector256.Ceiling(vector); 515static Vector256<T> ISimdVector<Vector256<T>, T>.Clamp(Vector256<T> value, Vector256<T> min, Vector256<T> max) => Vector256.Clamp(value, min, max); 519static Vector256<T> ISimdVector<Vector256<T>, T>.ClampNative(Vector256<T> value, Vector256<T> min, Vector256<T> max) => Vector256.ClampNative(value, min, max); 523static Vector256<T> ISimdVector<Vector256<T>, T>.ConditionalSelect(Vector256<T> condition, Vector256<T> left, Vector256<T> right) => Vector256.ConditionalSelect(condition, left, right); 527static Vector256<T> ISimdVector<Vector256<T>, T>.CopySign(Vector256<T> value, Vector256<T> sign) => Vector256.CopySign(value, sign); 540static int ISimdVector<Vector256<T>, T>.Count(Vector256<T> vector, T value) => Vector256.Count(vector, value); 544static int ISimdVector<Vector256<T>, T>.CountWhereAllBitsSet(Vector256<T> vector) => Vector256.CountWhereAllBitsSet(vector); 548static Vector256<T> ISimdVector<Vector256<T>, T>.Create(T value) => Vector256.Create(value); 551static Vector256<T> ISimdVector<Vector256<T>, T>.Create(T[] values) => Vector256.Create(values); 554static Vector256<T> ISimdVector<Vector256<T>, T>.Create(T[] values, int index) => Vector256.Create(values, index); 557static Vector256<T> ISimdVector<Vector256<T>, T>.Create(ReadOnlySpan<T> values) => Vector256.Create(values); 561static Vector256<T> ISimdVector<Vector256<T>, T>.CreateScalar(T value) => Vector256.CreateScalar(value); 565static Vector256<T> ISimdVector<Vector256<T>, T>.CreateScalarUnsafe(T value) => Vector256.CreateScalarUnsafe(value); 577static T ISimdVector<Vector256<T>, T>.Dot(Vector256<T> left, Vector256<T> right) => Vector256.Dot(left, right); 581static Vector256<T> ISimdVector<Vector256<T>, T>.Equals(Vector256<T> left, Vector256<T> right) => Vector256.Equals(left, right); 589static bool ISimdVector<Vector256<T>, T>.EqualsAny(Vector256<T> left, Vector256<T> right) => Vector256.EqualsAny(left, right); 593static Vector256<T> ISimdVector<Vector256<T>, T>.Floor(Vector256<T> vector) => Vector256.Floor(vector); 601static Vector256<T> ISimdVector<Vector256<T>, T>.GreaterThan(Vector256<T> left, Vector256<T> right) => Vector256.GreaterThan(left, right); 605static bool ISimdVector<Vector256<T>, T>.GreaterThanAll(Vector256<T> left, Vector256<T> right) => Vector256.GreaterThanAll(left, right); 609static bool ISimdVector<Vector256<T>, T>.GreaterThanAny(Vector256<T> left, Vector256<T> right) => Vector256.GreaterThanAny(left, right); 613static Vector256<T> ISimdVector<Vector256<T>, T>.GreaterThanOrEqual(Vector256<T> left, Vector256<T> right) => Vector256.GreaterThanOrEqual(left, right); 617static bool ISimdVector<Vector256<T>, T>.GreaterThanOrEqualAll(Vector256<T> left, Vector256<T> right) => Vector256.GreaterThanOrEqualAll(left, right); 621static bool ISimdVector<Vector256<T>, T>.GreaterThanOrEqualAny(Vector256<T> left, Vector256<T> right) => Vector256.GreaterThanOrEqualAny(left, right); 625static int ISimdVector<Vector256<T>, T>.IndexOf(Vector256<T> vector, T value) => Vector256.IndexOf(vector, value); 629static int ISimdVector<Vector256<T>, T>.IndexOfWhereAllBitsSet(Vector256<T> vector) => Vector256.IndexOfWhereAllBitsSet(vector); 633static Vector256<T> ISimdVector<Vector256<T>, T>.IsEvenInteger(Vector256<T> vector) => Vector256.IsEvenInteger(vector); 637static Vector256<T> ISimdVector<Vector256<T>, T>.IsFinite(Vector256<T> vector) => Vector256.IsFinite(vector); 641static Vector256<T> ISimdVector<Vector256<T>, T>.IsInfinity(Vector256<T> vector) => Vector256.IsInfinity(vector); 645static Vector256<T> ISimdVector<Vector256<T>, T>.IsInteger(Vector256<T> vector) => Vector256.IsInteger(vector); 649static Vector256<T> ISimdVector<Vector256<T>, T>.IsNaN(Vector256<T> vector) => Vector256.IsNaN(vector); 653static Vector256<T> ISimdVector<Vector256<T>, T>.IsNegative(Vector256<T> vector) => Vector256.IsNegative(vector); 657static Vector256<T> ISimdVector<Vector256<T>, T>.IsNegativeInfinity(Vector256<T> vector) => Vector256.IsNegativeInfinity(vector); 661static Vector256<T> ISimdVector<Vector256<T>, T>.IsNormal(Vector256<T> vector) => Vector256.IsNormal(vector); 665static Vector256<T> ISimdVector<Vector256<T>, T>.IsOddInteger(Vector256<T> vector) => Vector256.IsOddInteger(vector); 669static Vector256<T> ISimdVector<Vector256<T>, T>.IsPositive(Vector256<T> vector) => Vector256.IsPositive(vector); 673static Vector256<T> ISimdVector<Vector256<T>, T>.IsPositiveInfinity(Vector256<T> vector) => Vector256.IsPositiveInfinity(vector); 677static Vector256<T> ISimdVector<Vector256<T>, T>.IsSubnormal(Vector256<T> vector) => Vector256.IsSubnormal(vector); 680static Vector256<T> ISimdVector<Vector256<T>, T>.IsZero(Vector256<T> vector) => Vector256.IsZero(vector); 684static int ISimdVector<Vector256<T>, T>.LastIndexOf(Vector256<T> vector, T value) => Vector256.LastIndexOf(vector, value); 688static int ISimdVector<Vector256<T>, T>.LastIndexOfWhereAllBitsSet(Vector256<T> vector) => Vector256.LastIndexOfWhereAllBitsSet(vector); 692static Vector256<T> ISimdVector<Vector256<T>, T>.LessThan(Vector256<T> left, Vector256<T> right) => Vector256.LessThan(left, right); 696static bool ISimdVector<Vector256<T>, T>.LessThanAll(Vector256<T> left, Vector256<T> right) => Vector256.LessThanAll(left, right); 700static bool ISimdVector<Vector256<T>, T>.LessThanAny(Vector256<T> left, Vector256<T> right) => Vector256.LessThanAny(left, right); 704static Vector256<T> ISimdVector<Vector256<T>, T>.LessThanOrEqual(Vector256<T> left, Vector256<T> right) => Vector256.LessThanOrEqual(left, right); 708static bool ISimdVector<Vector256<T>, T>.LessThanOrEqualAll(Vector256<T> left, Vector256<T> right) => Vector256.LessThanOrEqualAll(left, right); 712static bool ISimdVector<Vector256<T>, T>.LessThanOrEqualAny(Vector256<T> left, Vector256<T> right) => Vector256.LessThanOrEqualAny(left, right); 716static Vector256<T> ISimdVector<Vector256<T>, T>.Load(T* source) => Vector256.Load(source); 720static Vector256<T> ISimdVector<Vector256<T>, T>.LoadAligned(T* source) => Vector256.LoadAligned(source); 724static Vector256<T> ISimdVector<Vector256<T>, T>.LoadAlignedNonTemporal(T* source) => Vector256.LoadAlignedNonTemporal(source); 728static Vector256<T> ISimdVector<Vector256<T>, T>.LoadUnsafe(ref readonly T source) => Vector256.LoadUnsafe(in source); 732static Vector256<T> ISimdVector<Vector256<T>, T>.LoadUnsafe(ref readonly T source, nuint elementOffset) => Vector256.LoadUnsafe(in source, elementOffset); 736static Vector256<T> ISimdVector<Vector256<T>, T>.Max(Vector256<T> left, Vector256<T> right) => Vector256.Max(left, right); 740static Vector256<T> ISimdVector<Vector256<T>, T>.MaxMagnitude(Vector256<T> left, Vector256<T> right) => Vector256.MaxMagnitude(left, right); 744static Vector256<T> ISimdVector<Vector256<T>, T>.MaxMagnitudeNumber(Vector256<T> left, Vector256<T> right) => Vector256.MaxMagnitudeNumber(left, right); 748static Vector256<T> ISimdVector<Vector256<T>, T>.MaxNative(Vector256<T> left, Vector256<T> right) => Vector256.MaxNative(left, right); 752static Vector256<T> ISimdVector<Vector256<T>, T>.MaxNumber(Vector256<T> left, Vector256<T> right) => Vector256.MaxNumber(left, right); 756static Vector256<T> ISimdVector<Vector256<T>, T>.Min(Vector256<T> left, Vector256<T> right) => Vector256.Min(left, right); 760static Vector256<T> ISimdVector<Vector256<T>, T>.MinMagnitude(Vector256<T> left, Vector256<T> right) => Vector256.MinMagnitude(left, right); 764static Vector256<T> ISimdVector<Vector256<T>, T>.MinMagnitudeNumber(Vector256<T> left, Vector256<T> right) => Vector256.MinMagnitudeNumber(left, right); 768static Vector256<T> ISimdVector<Vector256<T>, T>.MinNative(Vector256<T> left, Vector256<T> right) => Vector256.MinNative(left, right); 772static Vector256<T> ISimdVector<Vector256<T>, T>.MinNumber(Vector256<T> left, Vector256<T> right) => Vector256.MinNumber(left, right); 784static Vector256<T> ISimdVector<Vector256<T>, T>.MultiplyAddEstimate(Vector256<T> left, Vector256<T> right, Vector256<T> addend) => Vector256.MultiplyAddEstimate(left, right, addend); 792static bool ISimdVector<Vector256<T>, T>.None(Vector256<T> vector, T value) => Vector256.None(vector, value); 796static bool ISimdVector<Vector256<T>, T>.NoneWhereAllBitsSet(Vector256<T> vector) => Vector256.NoneWhereAllBitsSet(vector); 804static Vector256<T> ISimdVector<Vector256<T>, T>.Round(Vector256<T> vector) => Vector256.Round(vector); 820static Vector256<T> ISimdVector<Vector256<T>, T>.Sqrt(Vector256<T> vector) => Vector256.Sqrt(vector); 848static T ISimdVector<Vector256<T>, T>.Sum(Vector256<T> vector) => Vector256.Sum(vector); 856static Vector256<T> ISimdVector<Vector256<T>, T>.Truncate(Vector256<T> vector) => Vector256.Truncate(vector);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (275)
76Vector256.Abs(vector._lower), 77Vector256.Abs(vector._upper) 91/// <inheritdoc cref="Vector256.All{T}(Vector256{T}, T)" /> 96/// <inheritdoc cref="Vector256.AllWhereAllBitsSet{T}(Vector256{T})" /> 125/// <inheritdoc cref="Vector256.Any{T}(Vector256{T}, T)" /> 130/// <inheritdoc cref="Vector256.AnyWhereAllBitsSet{T}(Vector256{T})" /> 344Vector256.Ceiling(vector._lower), 345Vector256.Ceiling(vector._upper) 364/// <inheritdoc cref="Vector256.Clamp{T}(Vector256{T}, Vector256{T}, Vector256{T})" /> 372/// <inheritdoc cref="Vector256.ClampNative{T}(Vector256{T}, Vector256{T}, Vector256{T})" /> 400Vector256.ConvertToDouble(vector._lower), 401Vector256.ConvertToDouble(vector._upper) 414Vector256.ConvertToDouble(vector._lower), 415Vector256.ConvertToDouble(vector._upper) 427Vector256.ConvertToInt32(vector._lower), 428Vector256.ConvertToInt32(vector._upper) 440Vector256.ConvertToInt32Native(vector._lower), 441Vector256.ConvertToInt32Native(vector._upper) 453Vector256.ConvertToInt64(vector._lower), 454Vector256.ConvertToInt64(vector._upper) 466Vector256.ConvertToInt64Native(vector._lower), 467Vector256.ConvertToInt64Native(vector._upper) 479Vector256.ConvertToSingle(vector._lower), 480Vector256.ConvertToSingle(vector._upper) 493Vector256.ConvertToSingle(vector._lower), 494Vector256.ConvertToSingle(vector._upper) 507Vector256.ConvertToUInt32(vector._lower), 508Vector256.ConvertToUInt32(vector._upper) 521Vector256.ConvertToUInt32Native(vector._lower), 522Vector256.ConvertToUInt32Native(vector._upper) 535Vector256.ConvertToUInt64(vector._lower), 536Vector256.ConvertToUInt64(vector._upper) 549Vector256.ConvertToUInt64Native(vector._lower), 550Vector256.ConvertToUInt64Native(vector._upper) 554/// <inheritdoc cref="Vector256.CopySign{T}(Vector256{T}, Vector256{T})" /> 574Vector256.CopySign(value._lower, sign._lower), 575Vector256.CopySign(value._upper, sign._upper) 641/// <inheritdoc cref="Vector256.Cos(Vector256{double})" /> 652Vector256.Cos(vector._lower), 653Vector256.Cos(vector._upper) 658/// <inheritdoc cref="Vector256.Cos(Vector256{float})" /> 669Vector256.Cos(vector._lower), 670Vector256.Cos(vector._upper) 675/// <inheritdoc cref="Vector256.Count{T}(Vector256{T}, T)" /> 680/// <inheritdoc cref="Vector256.CountWhereAllBitsSet{T}(Vector256{T})" /> 707Vector256<T> vector = Vector256.Create(value); 929Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31), 930Vector256.Create(e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) 950Vector256.Create(e0, e1, e2, e3), 951Vector256.Create(e4, e5, e6, e7) 996Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 997Vector256.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1025Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1026Vector256.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1046Vector256.Create(e0, e1, e2, e3), 1047Vector256.Create(e4, e5, e6, e7) 1127Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31), 1128Vector256.Create(e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) 1156Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1157Vector256.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1203Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 1204Vector256.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1233Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1234Vector256.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1255Vector256.Create(e0, e1, e2, e3), 1256Vector256.Create(e4, e5, e6, e7) 1274public static Vector512<T> Create<T>(Vector128<T> value) => Create(Vector256.Create(value, value)); 1389public static Vector512<T> CreateScalar<T>(T value) => Vector256.CreateScalar(value).ToVector512(); 1573/// <inheritdoc cref="Vector256.DegreesToRadians(Vector256{double})" /> 1585Vector256.DegreesToRadians(degrees._lower), 1586Vector256.DegreesToRadians(degrees._upper) 1591/// <inheritdoc cref="Vector256.DegreesToRadians(Vector256{float})" /> 1603Vector256.DegreesToRadians(degrees._lower), 1604Vector256.DegreesToRadians(degrees._upper) 1648Vector256.Equals(left._lower, right._lower), 1649Vector256.Equals(left._upper, right._upper) 1672return Vector256.EqualsAny(left._lower, right._lower) 1673|| Vector256.EqualsAny(left._upper, right._upper); 1676/// <inheritdoc cref="Vector256.Exp(Vector256{double})" /> 1687Vector256.Exp(vector._lower), 1688Vector256.Exp(vector._upper) 1693/// <inheritdoc cref="Vector256.Exp(Vector256{float})" /> 1704Vector256.Exp(vector._lower), 1705Vector256.Exp(vector._upper) 1748Vector256.Floor(vector._lower), 1749Vector256.Floor(vector._upper) 1768/// <inheritdoc cref="Vector256.FusedMultiplyAdd(Vector256{double}, Vector256{double}, Vector256{double})" /> 1774Vector256.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 1775Vector256.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 1779/// <inheritdoc cref="Vector256.FusedMultiplyAdd(Vector256{float}, Vector256{float}, Vector256{float})" /> 1785Vector256.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 1786Vector256.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 1844Vector256.GreaterThan(left._lower, right._lower), 1845Vector256.GreaterThan(left._upper, right._upper) 1859return Vector256.GreaterThanAll(left._lower, right._lower) 1860&& Vector256.GreaterThanAll(left._upper, right._upper); 1873return Vector256.GreaterThanAny(left._lower, right._lower) 1874|| Vector256.GreaterThanAny(left._upper, right._upper); 1888Vector256.GreaterThanOrEqual(left._lower, right._lower), 1889Vector256.GreaterThanOrEqual(left._upper, right._upper) 1903return Vector256.GreaterThanOrEqualAll(left._lower, right._lower) 1904&& Vector256.GreaterThanOrEqualAll(left._upper, right._upper); 1917return Vector256.GreaterThanOrEqualAny(left._lower, right._lower) 1918|| Vector256.GreaterThanOrEqualAny(left._upper, right._upper); 1921/// <inheritdoc cref="Vector256.Hypot(Vector256{double}, Vector256{double})" /> 1932Vector256.Hypot(x._lower, y._lower), 1933Vector256.Hypot(x._upper, y._upper) 1938/// <inheritdoc cref="Vector256.Hypot(Vector256{float}, Vector256{float})" /> 1949Vector256.Hypot(x._lower, y._lower), 1950Vector256.Hypot(x._upper, y._upper) 1955/// <inheritdoc cref="Vector256.IndexOf{T}(Vector256{T}, T)" /> 1964/// <inheritdoc cref="Vector256.IndexOfWhereAllBitsSet{T}(Vector256{T})" /> 1983/// <inheritdoc cref="Vector256.IsEvenInteger{T}(Vector256{T})" /> 1999/// <inheritdoc cref="Vector256.IsFinite{T}(Vector256{T})" /> 2015/// <inheritdoc cref="Vector256.IsInfinity{T}(Vector256{T})" /> 2027/// <inheritdoc cref="Vector256.IsInteger{T}(Vector256{T})" /> 2039/// <inheritdoc cref="Vector256.IsNaN{T}(Vector256{T})" /> 2051/// <inheritdoc cref="Vector256.IsNegative{T}(Vector256{T})" /> 2078/// <inheritdoc cref="Vector256.IsNegativeInfinity{T}(Vector256{T})" /> 2094/// <inheritdoc cref="Vector256.IsNormal{T}(Vector256{T})" /> 2110/// <inheritdoc cref="Vector256.IsOddInteger{T}(Vector256{T})" /> 2126/// <inheritdoc cref="Vector256.IsPositive{T}(Vector256{T})" /> 2153/// <inheritdoc cref="Vector256.IsPositiveInfinity{T}(Vector256{T})" /> 2169/// <inheritdoc cref="Vector256.IsSubnormal{T}(Vector256{T})" /> 2185/// <inheritdoc cref="Vector256.IsZero{T}(Vector256{T})" /> 2190/// <inheritdoc cref="Vector256.LastIndexOf{T}(Vector256{T}, T)" /> 2195/// <inheritdoc cref="Vector256.LastIndexOfWhereAllBitsSet{T}(Vector256{T})" /> 2214/// <inheritdoc cref="Vector256.Lerp(Vector256{double}, Vector256{double}, Vector256{double})" /> 2226Vector256.Lerp(x._lower, y._lower, amount._lower), 2227Vector256.Lerp(x._upper, y._upper, amount._upper) 2232/// <inheritdoc cref="Vector256.Lerp(Vector256{float}, Vector256{float}, Vector256{float})" /> 2244Vector256.Lerp(x._lower, y._lower, amount._lower), 2245Vector256.Lerp(x._upper, y._upper, amount._upper) 2261Vector256.LessThan(left._lower, right._lower), 2262Vector256.LessThan(left._upper, right._upper) 2276return Vector256.LessThanAll(left._lower, right._lower) 2277&& Vector256.LessThanAll(left._upper, right._upper); 2290return Vector256.LessThanAny(left._lower, right._lower) 2291|| Vector256.LessThanAny(left._upper, right._upper); 2305Vector256.LessThanOrEqual(left._lower, right._lower), 2306Vector256.LessThanOrEqual(left._upper, right._upper) 2320return Vector256.LessThanOrEqualAll(left._lower, right._lower) 2321&& Vector256.LessThanOrEqualAll(left._upper, right._upper); 2334return Vector256.LessThanOrEqualAny(left._lower, right._lower) 2335|| Vector256.LessThanOrEqualAny(left._upper, right._upper); 2418/// <inheritdoc cref="Vector256.Log(Vector256{double})" /> 2429Vector256.Log(vector._lower), 2430Vector256.Log(vector._upper) 2435/// <inheritdoc cref="Vector256.Log(Vector256{float})" /> 2446Vector256.Log(vector._lower), 2447Vector256.Log(vector._upper) 2452/// <inheritdoc cref="Vector256.Log2(Vector256{double})" /> 2463Vector256.Log2(vector._lower), 2464Vector256.Log2(vector._upper) 2469/// <inheritdoc cref="Vector256.Log2(Vector256{float})" /> 2480Vector256.Log2(vector._lower), 2481Vector256.Log2(vector._upper) 2486/// <inheritdoc cref="Vector256.Max{T}(Vector256{T}, Vector256{T})" /> 2498Vector256.Max(left._lower, right._lower), 2499Vector256.Max(left._upper, right._upper) 2504/// <inheritdoc cref="Vector256.MaxMagnitude{T}(Vector256{T}, Vector256{T})" /> 2516Vector256.MaxMagnitude(left._lower, right._lower), 2517Vector256.MaxMagnitude(left._upper, right._upper) 2522/// <inheritdoc cref="Vector256.MaxMagnitudeNumber{T}(Vector256{T}, Vector256{T})" /> 2534Vector256.MaxMagnitudeNumber(left._lower, right._lower), 2535Vector256.MaxMagnitudeNumber(left._upper, right._upper) 2540/// <inheritdoc cref="Vector256.MaxNative{T}(Vector256{T}, Vector256{T})" /> 2552Vector256.MaxNative(left._lower, right._lower), 2553Vector256.MaxNative(left._upper, right._upper) 2558/// <inheritdoc cref="Vector256.MaxNumber{T}(Vector256{T}, Vector256{T})" /> 2570Vector256.MaxNumber(left._lower, right._lower), 2571Vector256.MaxNumber(left._upper, right._upper) 2576/// <inheritdoc cref="Vector256.Min{T}(Vector256{T}, Vector256{T})" /> 2588Vector256.Min(left._lower, right._lower), 2589Vector256.Min(left._upper, right._upper) 2594/// <inheritdoc cref="Vector256.MinMagnitude{T}(Vector256{T}, Vector256{T})" /> 2606Vector256.MinMagnitude(left._lower, right._lower), 2607Vector256.MinMagnitude(left._upper, right._upper) 2612/// <inheritdoc cref="Vector256.MinMagnitudeNumber{T}(Vector256{T}, Vector256{T})" /> 2624Vector256.MinMagnitudeNumber(left._lower, right._lower), 2625Vector256.MinMagnitudeNumber(left._upper, right._upper) 2630/// <inheritdoc cref="Vector256.MinNative{T}(Vector256{T}, Vector256{T})" /> 2642Vector256.MinNative(left._lower, right._lower), 2643Vector256.MinNative(left._upper, right._upper) 2648/// <inheritdoc cref="Vector256.MinNumber{T}(Vector256{T}, Vector256{T})" /> 2660Vector256.MinNumber(left._lower, right._lower), 2661Vector256.MinNumber(left._upper, right._upper) 2698Vector256.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2699Vector256.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2703/// <inheritdoc cref="Vector256.MultiplyAddEstimate(Vector256{double}, Vector256{double}, Vector256{double})" /> 2709Vector256.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2710Vector256.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2714/// <inheritdoc cref="Vector256.MultiplyAddEstimate(Vector256{float}, Vector256{float}, Vector256{float})" /> 2719Vector256.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2720Vector256.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2733Vector256.Narrow(lower._lower, lower._upper), 2734Vector256.Narrow(upper._lower, upper._upper) 2748Vector256.Narrow(lower._lower, lower._upper), 2749Vector256.Narrow(upper._lower, upper._upper) 2762Vector256.Narrow(lower._lower, lower._upper), 2763Vector256.Narrow(upper._lower, upper._upper) 2776Vector256.Narrow(lower._lower, lower._upper), 2777Vector256.Narrow(upper._lower, upper._upper) 2791Vector256.Narrow(lower._lower, lower._upper), 2792Vector256.Narrow(upper._lower, upper._upper) 2806Vector256.Narrow(lower._lower, lower._upper), 2807Vector256.Narrow(upper._lower, upper._upper) 2821Vector256.Narrow(lower._lower, lower._upper), 2822Vector256.Narrow(upper._lower, upper._upper) 2834/// <inheritdoc cref="Vector256.None{T}(Vector256{T}, T)" /> 2839/// <inheritdoc cref="Vector256.NoneWhereAllBitsSet{T}(Vector256{T})" /> 2866/// <inheritdoc cref="Vector256.RadiansToDegrees(Vector256{double})" /> 2878Vector256.RadiansToDegrees(radians._lower), 2879Vector256.RadiansToDegrees(radians._upper) 2884/// <inheritdoc cref="Vector256.RadiansToDegrees(Vector256{float})" /> 2896Vector256.RadiansToDegrees(radians._lower), 2897Vector256.RadiansToDegrees(radians._upper) 2922Vector256.Round(vector._lower), 2923Vector256.Round(vector._upper) 2928/// <inheritdoc cref="Vector256.Round(Vector256{double})" /> 2932/// <inheritdoc cref="Vector256.Round(Vector256{float})" /> 2936/// <inheritdoc cref="Vector256.Round(Vector256{double}, MidpointRounding)" /> 2940/// <inheritdoc cref="Vector256.Round(Vector256{float}, MidpointRounding)" /> 3022Vector256.ShiftLeft(vector._lower, shiftCount._lower), 3023Vector256.ShiftLeft(vector._lower, shiftCount._upper) 3039Vector256.ShiftLeft(vector._lower, shiftCount._lower), 3040Vector256.ShiftLeft(vector._lower, shiftCount._upper) 3675/// <inheritdoc cref="Vector256.Sin(Vector256{double})" /> 3686Vector256.Sin(vector._lower), 3687Vector256.Sin(vector._upper) 3692/// <inheritdoc cref="Vector256.Sin(Vector256{float})" /> 3703Vector256.Sin(vector._lower), 3704Vector256.Sin(vector._upper) 3709/// <inheritdoc cref="Vector256.Cos(Vector256{double})" /> 3719(Vector256<double> sinLower, Vector256<double> cosLower) = Vector256.SinCos(vector._lower); 3720(Vector256<double> sinUpper, Vector256<double> cosUpper) = Vector256.SinCos(vector._upper); 3729/// <inheritdoc cref="Vector256.Cos(Vector256{float})" /> 3739(Vector256<float> sinLower, Vector256<float> cosLower) = Vector256.SinCos(vector._lower); 3740(Vector256<float> sinUpper, Vector256<float> cosUpper) = Vector256.SinCos(vector._upper); 3759Vector256.Sqrt(vector._lower), 3760Vector256.Sqrt(vector._upper) 3855T result = Vector256.Sum(vector._lower); 3856result = Scalar<T>.Add(result, Vector256.Sum(vector._upper)); 3892Vector256.Truncate(vector._lower), 3893Vector256.Truncate(vector._upper) 3898/// <inheritdoc cref="Vector256.Truncate(Vector256{double})" /> 3902/// <inheritdoc cref="Vector256.Truncate(Vector256{float})" /> 3980Vector256.WidenLower(lower), 3981Vector256.WidenUpper(lower) 3995Vector256.WidenLower(lower), 3996Vector256.WidenUpper(lower) 4010Vector256.WidenLower(lower), 4011Vector256.WidenUpper(lower) 4026Vector256.WidenLower(lower), 4027Vector256.WidenUpper(lower) 4040Vector256.WidenLower(lower), 4041Vector256.WidenUpper(lower) 4056Vector256.WidenLower(lower), 4057Vector256.WidenUpper(lower) 4072Vector256.WidenLower(lower), 4073Vector256.WidenUpper(lower) 4088Vector256.WidenLower(upper), 4089Vector256.WidenUpper(upper) 4103Vector256.WidenLower(upper), 4104Vector256.WidenUpper(upper) 4118Vector256.WidenLower(upper), 4119Vector256.WidenUpper(upper) 4134Vector256.WidenLower(upper), 4135Vector256.WidenUpper(upper) 4149Vector256.WidenLower(upper), 4150Vector256.WidenUpper(upper) 4165Vector256.WidenLower(upper), 4166Vector256.WidenUpper(upper) 4181Vector256.WidenLower(upper), 4182Vector256.WidenUpper(upper)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (13)
2374result = (TVectorDouble)(object)Vector256.ConvertToDouble((Vector256<long>)(object)vector); 2409result = (TVectorSingle)(object)Vector256.ConvertToSingle((Vector256<int>)(object)vector); 2533result = (TVector)(object)Vector256.Create(value); 2567result = (TVector)(object)Vector256.Create(value); 2627result = (TVectorSingle)(object)Vector256.Narrow(value.GetLower(), value.GetUpper()); 2663result = (TVectorSingle)(object)Vector256.Narrow((Vector256<double>)(object)lower, (Vector256<double>)(object)upper); 2707result = (TVectorUInt32)(object)Vector256.ShiftLeft( 2756result = (TVectorUInt64)(object)Vector256.ShiftLeft( 2934result = (TVectorDouble)(object)Vector256.Create(lower, upper); 2949Vector256<double> lower = Vector256.WidenLower(value); 2950Vector256<double> upper = Vector256.WidenUpper(value); 2988result = (TVectorDouble)(object)Vector256.WidenLower((Vector256<float>)(object)vector); 3028result = (TVectorDouble)(object)Vector256.WidenUpper((Vector256<float>)(object)vector);
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (35)
19public Vector256<byte> Bitmap = Vector256.Create(bitmap); 28public readonly Vector256<byte> Bitmap0 = Vector256.Create(bitmap0); 29public readonly Vector256<byte> Bitmap1 = Vector256.Create(bitmap1); 221state.Bitmap = Vector256.Create(state.Bitmap.GetLower()); 248state.Bitmap = Vector256.Create(state.Bitmap.GetLower()); 329Vector256<short> source0 = Vector256.LoadUnsafe(ref currentSearchSpace); 330Vector256<short> source1 = Vector256.LoadUnsafe(ref currentSearchSpace, (nuint)Vector256<short>.Count); 353Vector256<short> source0 = Vector256.LoadUnsafe(ref firstVector); 354Vector256<short> source1 = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 463Vector256<short> source0 = Vector256.LoadUnsafe(ref currentSearchSpace); 464Vector256<short> source1 = Vector256.LoadUnsafe(ref currentSearchSpace, (nuint)Vector256<short>.Count); 485Vector256<short> source0 = Vector256.LoadUnsafe(ref searchSpace); 486Vector256<short> source1 = Vector256.LoadUnsafe(ref secondVector); 612Vector256<byte> source = Vector256.LoadUnsafe(ref currentSearchSpace); 637Vector256<byte> source = Vector256.Create(source0, source1); 739Vector256<byte> source = Vector256.LoadUnsafe(ref currentSearchSpace); 762Vector256<byte> source = Vector256.Create(source0, source1); 884Vector256<byte> source = Vector256.LoadUnsafe(ref currentSearchSpace); 909Vector256<byte> source = Vector256.Create(source0, source1); 1014Vector256<byte> source = Vector256.LoadUnsafe(ref currentSearchSpace); 1037Vector256<byte> source = Vector256.Create(source0, source1); 1192return Vector256.Equals(source, values); 1198Vector256<byte> bitPositions = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles); 1235Vector256<byte> lowNibbles = source & Vector256.Create((byte)0xF); 1241Vector256<byte> bitmask = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles); 1243Vector256<byte> mask = Vector256.GreaterThan(highNibbles.AsSByte(), Vector256.Create((sbyte)0x7)).AsByte(); 1244Vector256<byte> bitsets = Vector256.ConditionalSelect(mask, row1, row0); 1246Vector256<byte> result = Vector256.Equals(bitsets & bitmask, bitmask); 1330public static uint ExtractMask(Vector256<byte> result) => ~Vector256.Equals(result, Vector256<byte>.Zero).ExtractMostSignificantBits(); 1341public static Vector256<byte> NegateIfNeeded(Vector256<byte> result) => Vector256.Equals(result, Vector256<byte>.Zero); 1393Vector256.Min(lower, Vector256.Create((ushort)255)).AsInt16(), 1394Vector256.Min(upper, Vector256.Create((ushort)255)).AsInt16());
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (23)
145Vector256<ushort> source0 = Vector256.LoadUnsafe(ref searchSpace0); 146Vector256<ushort> source1 = Vector256.LoadUnsafe(ref searchSpace1); 148Vector256<byte> sourceLower = Avx512Vbmi.VL.PermuteVar32x8x2(source0.AsByte(), Vector256.CreateSequence<byte>(0, 2), source1.AsByte()); 149Vector256<byte> sourceUpper = Avx512Vbmi.VL.PermuteVar32x8x2(source0.AsByte(), Vector256.CreateSequence<byte>(1, 2), source1.AsByte()); 167Vector256<byte> bitPositions = Avx512Vbmi.VL.PermuteVar32x8(Vector256.Create(0x8040201008040201).AsByte(), shifted); 173return Vector256.Equals(bitMask & bitPositions, Vector256<byte>.Zero); 180Vector256<ushort> source0 = Vector256.LoadUnsafe(ref searchSpace); 181Vector256<ushort> source1 = Vector256.LoadUnsafe(ref searchSpace, (nuint)Vector256<ushort>.Count); 184(source0 & Vector256.Create((ushort)255)).AsInt16(), 185(source1 & Vector256.Create((ushort)255)).AsInt16()); 203Vector256<byte> bitPositions = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), shifted); 205Vector256<byte> index = values & Vector256.Create((byte)VectorizedIndexMask); 207Vector256<byte> bitMaskUpper = Avx2.Shuffle(charMapUpper, index - Vector256.Create((byte)16)); 208Vector256<byte> mask = Vector256.GreaterThan(index, Vector256.Create((byte)15)); 209Vector256<byte> bitMask = Vector256.ConditionalSelect(mask, bitMaskUpper, bitMaskLower); 211return Vector256.Equals(bitMask & bitPositions, Vector256<byte>.Zero); 422Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 514Vector256<byte> charMapLower256 = Vector256.Create(charMapLower); 515Vector256<byte> charMapUpper256 = Vector256.Create(charMapUpper); 597Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 691Vector256<byte> charMapLower256 = Vector256.Create(charMapLower); 692Vector256<byte> charMapUpper256 = Vector256.Create(charMapUpper);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (1)
587uint resultMask = (~Vector256.Equals(result, Vector256<byte>.Zero)).ExtractMostSignificantBits();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (19)
148Value256 = Vector256.Create( 155Value256 = Vector256.Create(Vector128.Create( 165Value256 = Vector256.Create(Vector128.Create(Vector64.Create( 174Vector256.GreaterThanOrEqual(Value256, Vector256.Create((ushort)'A')) & 175Vector256.LessThanOrEqual(Value256, Vector256.Create((ushort)'Z')); 177ToUpperMask256 = Vector256.ConditionalSelect(isAsciiLetter, Vector256.Create(unchecked((ushort)~0x20)), Vector256.Create(ushort.MaxValue)); 188if (Vector256.IsHardwareAccelerated) 190Vector256<ushort> input = Vector256.Create( 210if (Vector256.IsHardwareAccelerated) 212Vector256<ushort> input = Vector256.Create( 294public static Vector256<byte> TransformInput(Vector256<byte> input) => input & Vector256.Create(unchecked((byte)~0x20)); 354Vector256<byte> subtraction = Vector256.Create((byte)(128 + 'a')); 355Vector256<byte> comparison = Vector256.Create((byte)(128 + 26)); 356Vector256<byte> caseConversion = Vector256.Create((byte)0x20); 358Vector256<byte> matches = Vector256.LessThan((input - subtraction).AsSByte(), comparison.AsSByte()).AsByte();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (2)
242Vector256<ushort> source0 = Vector256.LoadUnsafe(ref source); 243Vector256<ushort> source1 = Vector256.LoadUnsafe(ref source, (nuint)Vector256<ushort>.Count);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (17)
139else if (Vector256.IsHardwareAccelerated && searchSpaceMinusValueTailLength - Vector256<ushort>.Count >= 0) 141Vector256<ushort> ch1 = Vector256.Create(_ch1); 142Vector256<ushort> ch2 = Vector256.Create(_ch2); 143Vector256<ushort> ch3 = Vector256.Create(_ch3); 287Vector256<ushort> cmpCh1 = Vector256.Equals(ch1, Vector256.LoadUnsafe(ref searchSpace)); 288Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 289Vector256<ushort> cmpCh3 = Vector256.Equals(ch3, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 294Vector256<ushort> caseConversion = Vector256.Create(CaseConversionMask); 296Vector256<ushort> cmpCh1 = Vector256.Equals(ch1, Vector256.LoadUnsafe(ref searchSpace) & caseConversion); 297Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 298Vector256<ushort> cmpCh3 = Vector256.Equals(ch3, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (36)
127else if (Vector256.IsHardwareAccelerated && searchSpaceMinusValueTailLength - Vector256<byte>.Count >= 0) 136Vector256<byte> ch1 = Vector256.Create(value); 137Vector256<byte> ch2 = Vector256.Create(ch2Val); 148Vector256<byte> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 149Vector256<byte> cmpCh1 = Vector256.Equals(ch1, Vector256.LoadUnsafe(ref searchSpace, (nuint)offset)); 346else if (Vector256.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector256<byte>.Count) 357Vector256<byte> ch1 = Vector256.Create(value); 358Vector256<byte> ch2 = Vector256.Create(ch2Val); 361Vector256<byte> cmpCh1 = Vector256.Equals(ch1, Vector256.LoadUnsafe(ref searchSpace, (nuint)offset)); 362Vector256<byte> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 552Vector256<byte> search = Vector256.Load(searchSpace + offset); 555uint matches = Vector256.Equals(Vector256<byte>.Zero, search).ExtractMostSignificantBits(); 591Vector256<byte> search = Vector256.Load(searchSpace + offset); 594uint matches = Vector256.Equals(Vector256<byte>.Zero, search).ExtractMostSignificantBits(); 633else if (Vector256.IsHardwareAccelerated) 664Vector256<byte> search = Vector256.Load(searchSpace + offset); 665uint matches = Vector256.Equals(Vector256<byte>.Zero, search).ExtractMostSignificantBits(); 853else if (Vector256.IsHardwareAccelerated && length >= (nuint)Vector256<byte>.Count) 863if (Vector256.LoadUnsafe(ref first, offset) != 864Vector256.LoadUnsafe(ref second, offset)) 873if (Vector256.LoadUnsafe(ref first, lengthToExamine) == 874Vector256.LoadUnsafe(ref second, lengthToExamine)) 976if (Vector256.IsHardwareAccelerated) 1025matches = Vector256.Equals(Vector256.LoadUnsafe(ref first, offset), Vector256.LoadUnsafe(ref second, offset)).ExtractMostSignificantBits(); 1042matches = Vector256.Equals(Vector256.LoadUnsafe(ref first, offset), Vector256.LoadUnsafe(ref second, offset)).ExtractMostSignificantBits(); 1346Vector256<byte> reverseMask = Vector256.Create( 1354Vector256<byte> tempFirst = Vector256.LoadUnsafe(ref buf, (nuint)offset); 1355Vector256<byte> tempLast = Vector256.LoadUnsafe(ref buf, (nuint)lastOffset);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (21)
138else if (Vector256.IsHardwareAccelerated && searchSpaceMinusValueTailLength - Vector256<ushort>.Count >= 0) 147Vector256<ushort> ch1 = Vector256.Create((ushort)valueHead); 148Vector256<ushort> ch2 = Vector256.Create(ch2Val); 158Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 159Vector256<ushort> cmpCh1 = Vector256.Equals(ch1, Vector256.LoadUnsafe(ref searchSpace, (nuint)offset)); 363else if (Vector256.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector256<ushort>.Count) 374Vector256<ushort> ch1 = Vector256.Create((ushort)valueHead); 375Vector256<ushort> ch2 = Vector256.Create((ushort)ch2Val); 380Vector256<ushort> cmpCh1 = Vector256.Equals(ch1, Vector256.LoadUnsafe(ref searchSpace, (nuint)offset)); 381Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 628uint matches = Vector256.Equals(Vector256<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 680uint matches = Vector256.Equals(Vector256<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 725else if (Vector256.IsHardwareAccelerated) 766uint matches = Vector256.Equals(Vector256<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 931Vector256<byte> reverseMask = Vector256.Create( 941Vector256<byte> tempFirst = Vector256.LoadUnsafe(ref first); 942Vector256<byte> tempLast = Vector256.LoadUnsafe(ref last);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (6)
131Vector256<int> tempFirst = Vector256.LoadUnsafe(ref buf, (nuint)offset); 132Vector256<int> tempLast = Vector256.LoadUnsafe(ref buf, (nuint)lastOffset); 142tempFirst = Avx2.PermuteVar8x32(tempFirst, Vector256.Create(7, 6, 5, 4, 3, 2, 1, 0)); 143tempLast = Avx2.PermuteVar8x32(tempLast, Vector256.Create(7, 6, 5, 4, 3, 2, 1, 0)); 236Vector256<long> tempFirst = Vector256.LoadUnsafe(ref buf, (nuint)offset); 237Vector256<long> tempLast = Vector256.LoadUnsafe(ref buf, (nuint)lastOffset);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (46)
201Vector256<byte> packedValue = Vector256.Create((byte)value); 213Vector256<short> source0 = Vector256.LoadUnsafe(ref currentSearchSpace); 214Vector256<short> source1 = Vector256.LoadUnsafe(ref currentSearchSpace, (nuint)Vector256<short>.Count); 216Vector256<byte> result = Vector256.Equals(packedValue, packedSource); 237Vector256<short> source0 = Vector256.LoadUnsafe(ref firstVector); 238Vector256<short> source1 = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 240Vector256<byte> result = Vector256.Equals(packedValue, packedSource); 400Vector256<byte> packedValue = Vector256.Create((byte)value); 412Vector256<short> source0 = Vector256.LoadUnsafe(ref currentSearchSpace); 413Vector256<short> source1 = Vector256.LoadUnsafe(ref currentSearchSpace, (nuint)Vector256<short>.Count); 415Vector256<byte> result = Vector256.Equals(packedValue, packedSource); 437Vector256<short> source0 = Vector256.LoadUnsafe(ref firstVector); 438Vector256<short> source1 = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 440Vector256<byte> result = Vector256.Equals(packedValue, packedSource); 612Vector256<byte> packedValue0 = Vector256.Create((byte)value0); 613Vector256<byte> packedValue1 = Vector256.Create((byte)value1); 625Vector256<short> source0 = Vector256.LoadUnsafe(ref currentSearchSpace); 626Vector256<short> source1 = Vector256.LoadUnsafe(ref currentSearchSpace, (nuint)Vector256<short>.Count); 628Vector256<byte> result = Vector256.Equals(packedValue0, packedSource) | Vector256.Equals(packedValue1, packedSource); 650Vector256<short> source0 = Vector256.LoadUnsafe(ref firstVector); 651Vector256<short> source1 = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 653Vector256<byte> result = Vector256.Equals(packedValue0, packedSource) | Vector256.Equals(packedValue1, packedSource); 828Vector256<byte> packedValue0 = Vector256.Create((byte)value0); 829Vector256<byte> packedValue1 = Vector256.Create((byte)value1); 830Vector256<byte> packedValue2 = Vector256.Create((byte)value2); 842Vector256<short> source0 = Vector256.LoadUnsafe(ref currentSearchSpace); 843Vector256<short> source1 = Vector256.LoadUnsafe(ref currentSearchSpace, (nuint)Vector256<short>.Count); 845Vector256<byte> result = Vector256.Equals(packedValue0, packedSource) | Vector256.Equals(packedValue1, packedSource) | Vector256.Equals(packedValue2, packedSource); 867Vector256<short> source0 = Vector256.LoadUnsafe(ref firstVector); 868Vector256<short> source1 = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 870Vector256<byte> result = Vector256.Equals(packedValue0, packedSource) | Vector256.Equals(packedValue1, packedSource) | Vector256.Equals(packedValue2, packedSource); 1025Vector256<byte> lowVector = Vector256.Create((byte)lowInclusive); 1026Vector256<byte> rangeVector = Vector256.Create((byte)rangeInclusive); 1038Vector256<short> source0 = Vector256.LoadUnsafe(ref currentSearchSpace); 1039Vector256<short> source1 = Vector256.LoadUnsafe(ref currentSearchSpace, (nuint)Vector256<short>.Count); 1041Vector256<byte> result = Vector256.LessThanOrEqual(packedSource - lowVector, rangeVector); 1063Vector256<short> source0 = Vector256.LoadUnsafe(ref firstVector); 1064Vector256<short> source1 = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 1066Vector256<byte> result = Vector256.LessThanOrEqual(packedSource - lowVector, rangeVector); 1341public static Vector256<byte> TransformInput(Vector256<byte> input) => input | Vector256.Create((byte)0x20);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (151)
66vector = Vector256.Create(vec128).AsVector(); 1418else if (Vector256.IsHardwareAccelerated && length >= Vector256<T>.Count) 1420Vector256<T> equals, values = Vector256.Create(value); 1427equals = Vector256.Equals(values, Vector256.LoadUnsafe(ref currentSearchSpace)); 1441equals = Vector256.Equals(values, Vector256.LoadUnsafe(ref oneVectorAwayFromEnd)); 1609else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 1611Vector256<TValue> equals, values = Vector256.Create(value); 1618equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref currentSearchSpace))); 1632equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref oneVectorAwayFromEnd))); 1835else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 1837Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1); 1844current = Vector256.LoadUnsafe(ref currentSearchSpace); 1845equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current)); 1859current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 1860equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current)); 2042else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2044Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2); 2051current = Vector256.LoadUnsafe(ref currentSearchSpace); 2052equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current)); 2066current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 2067equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current)); 2200else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2202Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2), values3 = Vector256.Create(value3); 2209current = Vector256.LoadUnsafe(ref currentSearchSpace); 2210equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) 2211| Vector256.Equals(values2, current) | Vector256.Equals(values3, current)); 2225current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 2226equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) 2227| Vector256.Equals(values2, current) | Vector256.Equals(values3, current)); 2364else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2366Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), 2367values2 = Vector256.Create(value2), values3 = Vector256.Create(value3), values4 = Vector256.Create(value4); 2374current = Vector256.LoadUnsafe(ref currentSearchSpace); 2375equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current) 2376| Vector256.Equals(values3, current) | Vector256.Equals(values4, current)); 2390current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 2391equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current) 2392| Vector256.Equals(values3, current) | Vector256.Equals(values4, current)); 2515else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2680else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2682Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1); 2688current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2689equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1)); 2702current = Vector256.LoadUnsafe(ref searchSpace); 2703equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1)); 2865else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2867Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2); 2873current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2874equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2)); 2887current = Vector256.LoadUnsafe(ref searchSpace); 2888equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2)); 3015else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 3017Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2), values3 = Vector256.Create(value3); 3023current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3024equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) 3025| Vector256.Equals(current, values2) | Vector256.Equals(current, values3)); 3037current = Vector256.LoadUnsafe(ref searchSpace); 3038equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2) | Vector256.Equals(current, values3)); 3117if (!Vector256.IsHardwareAccelerated || length < (uint)Vector256<T>.Count) 3148Vector256<T> oldValues = Vector256.Create(oldValue); 3149Vector256<T> newValues = Vector256.Create(newValue); 3154original = Vector256.LoadUnsafe(ref src, idx); 3155mask = Vector256.Equals(oldValues, original); 3156result = Vector256.ConditionalSelect(mask, newValues, original); 3163original = Vector256.LoadUnsafe(ref src, lastVectorIndex); 3164mask = Vector256.Equals(oldValues, original); 3165result = Vector256.ConditionalSelect(mask, newValues, original); 3275else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 3277Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), 3278values2 = Vector256.Create(value2), values3 = Vector256.Create(value3), values4 = Vector256.Create(value4); 3284current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3285equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2) 3286| Vector256.Equals(current, values3) | Vector256.Equals(current, values4)); 3298current = Vector256.LoadUnsafe(ref searchSpace); 3299equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2) 3300| Vector256.Equals(current, values3) | Vector256.Equals(current, values4)); 3532else if (!Vector256.IsHardwareAccelerated || length < Vector256<T>.Count) 3563Vector256<T> lowVector = Vector256.Create(lowInclusive); 3564Vector256<T> rangeVector = Vector256.Create(highInclusive - lowInclusive); 3573inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref current) - lowVector, rangeVector)); 3584inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref oneVectorAwayFromEnd) - lowVector, rangeVector)); 3679else if (!Vector256.IsHardwareAccelerated || length < Vector256<T>.Count) 3708Vector256<T> lowVector = Vector256.Create(lowInclusive); 3709Vector256<T> rangeVector = Vector256.Create(highInclusive - lowInclusive); 3717inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref searchSpace, (nuint)offset) - lowVector, rangeVector)); 3727inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref searchSpace) - lowVector, rangeVector)); 3819else if (Vector256.IsHardwareAccelerated && length >= Vector256<T>.Count) 3821Vector256<T> targetVector = Vector256.Create(value); 3825count += BitOperations.PopCount(Vector256.Equals(Vector256.LoadUnsafe(ref current), targetVector).ExtractMostSignificantBits()); 3830uint mask = Vector256.Equals(Vector256.LoadUnsafe(ref oneVectorAwayFromEnd), targetVector).ExtractMostSignificantBits();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (9)
1307else if (Vector256.IsHardwareAccelerated && length >= (uint)Vector256<ushort>.Count) 2072else if (Vector256.IsHardwareAccelerated && lengthToExamine >= (uint)Vector256<ushort>.Count*2) 2074Vector256<ushort> v1 = Vector256.Create((ushort)c); 2075Vector256<ushort> v2 = Vector256.Create((ushort)c2); 2076Vector256<ushort> v3 = Vector256.Create((ushort)c3); 2080Vector256<ushort> vector = Vector256.LoadUnsafe(ref source, offset); 2081Vector256<ushort> v1Eq = Vector256.Equals(vector, v1); 2082Vector256<ushort> v2Eq = Vector256.Equals(vector, v2); 2083Vector256<ushort> v3Eq = Vector256.Equals(vector, v3);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (3)
479if (Vector256.IsHardwareAccelerated) 481Vector256<ushort> wide = Vector256.WidenLower(vector.AsByte().ToVector256Unsafe()); 482Vector256.StoreUnsafe(wide, ref *(ushort*)pDest, elementOffset);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (14)
122Vector256.LoadUnsafe(ref searchSpace) | 123Vector256.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector256<T>.Count))); 131Vector256.LoadUnsafe(ref searchSpace) | 132Vector256.LoadUnsafe(ref searchSpace, (nuint)Vector256<T>.Count) | 133Vector256.LoadUnsafe(ref searchSpace, 2 * (nuint)Vector256<T>.Count) | 134Vector256.LoadUnsafe(ref searchSpace, 3 * (nuint)Vector256<T>.Count))) 155Vector256.LoadUnsafe(ref current) | 156Vector256.LoadUnsafe(ref current, (nuint)Vector256<T>.Count) | 157Vector256.LoadUnsafe(ref current, 2 * (nuint)Vector256<T>.Count) | 158Vector256.LoadUnsafe(ref current, 3 * (nuint)Vector256<T>.Count))) 171Vector256.LoadUnsafe(ref searchSpace) | 172Vector256.LoadUnsafe(ref searchSpace, (nuint)Vector256<T>.Count) | 173Vector256.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, 2 * Vector256<T>.Count)) | 174Vector256.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector256<T>.Count)));
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (18)
316Vector256<TRight> loweringMask = Vector256.Create(TRight.CreateTruncating(0x20)); 317Vector256<TRight> vecA = Vector256.Create(TRight.CreateTruncating('a')); 318Vector256<TRight> vecZMinusA = Vector256.Create(TRight.CreateTruncating(('z' - 'a'))); 324rightValues = Vector256.LoadUnsafe(ref currentRightSearchSpace); 331Vector256<TRight> notEquals = ~Vector256.Equals(leftValues, rightValues); 340if (Vector256.GreaterThanAny((leftValues - vecA) & notEquals, vecZMinusA) || leftValues != rightValues) 355rightValues = Vector256.LoadUnsafe(ref oneVectorAwayFromRightEnd); 362Vector256<TRight> notEquals = ~Vector256.Equals(leftValues, rightValues); 371if (Vector256.GreaterThanAny((leftValues - vecA) & notEquals, vecZMinusA) || leftValues != rightValues) 475public static Vector256<T> Load256(ref T ptr) => Vector256.LoadUnsafe(ref ptr); 482Vector256<T> leftValues = Vector256.LoadUnsafe(ref left); 483Vector256<T> rightValues = Vector256.LoadUnsafe(ref right); 542return Vector256.Create(lower, upper); 548return Vector512.WidenLower(Vector256.LoadUnsafe(ref ptr).ToVector512()); 558Vector256<byte> leftNotWidened = Vector256.LoadUnsafe(ref utf8); 564(Vector256<ushort> leftLower, Vector256<ushort> leftUpper) = Vector256.Widen(leftNotWidened); 565Vector256<ushort> right = Vector256.LoadUnsafe(ref utf16); 566Vector256<ushort> rightNext = Vector256.LoadUnsafe(ref utf16, (uint)Vector256<ushort>.Count);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (43)
116!Vector256.IsHardwareAccelerated && 179else if (Vector256.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector256<byte>.Count) 181if (Vector256.Load(pBuffer).ExtractMostSignificantBits() == 0) 187byte* pFinalVectorReadPos = pBuffer + bufferLength - Vector256.Size; 188pBuffer = (byte*)(((nuint)pBuffer + Vector256.Size) & ~(nuint)(Vector256.Size - 1)); 192Debug.Assert(0 < numBytesRead && numBytesRead <= Vector256.Size, "We should've made forward progress of at least one byte."); 200Debug.Assert((nuint)pBuffer % Vector256.Size == 0, "Vector read should be aligned."); 201if (Vector256.LoadAligned(pBuffer).ExtractMostSignificantBits() != 0) 206pBuffer += Vector256.Size; 736!Vector256.IsHardwareAccelerated && 799else if (Vector256.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector256<ushort>.Count) 801const uint SizeOfVector256InChars = Vector256.Size / sizeof(ushort); 803if (!VectorContainsNonAsciiChar(Vector256.Load((ushort*)pBuffer))) 810pBuffer = (char*)(((nuint)pBuffer + Vector256.Size) & ~(nuint)(Vector256.Size - 1)); 822Debug.Assert((nuint)pBuffer % Vector256.Size == 0, "Vector read should be aligned."); 823if (VectorContainsNonAsciiChar(Vector256.LoadAligned((ushort*)pBuffer))) 1377else if (Vector256.IsHardwareAccelerated && elementCount >= 2 * (uint)Vector256<byte>.Count) 1583Vector256<ushort> zeroIsAscii = utf16Vector & Vector256.Create(asciiMask); 1640Avx.IsSupported ? (vector.AsByte() & Vector256.Create((byte)0x80)) == Vector256<byte>.Zero: 1645return (vector.AsUInt16() & Vector256.Create((ushort)0xFF80)) == Vector256<ushort>.Zero; 1695: Vector256.Narrow(vectorFirst, vectorSecond); 1833const nuint MaskOfAllBitsInVector256 = (nuint)(Vector256.Size - 1); 1839Debug.Assert(Vector256.IsHardwareAccelerated, "Vector256 is required."); 1841Debug.Assert(elementCount >= 2 * Vector256.Size); 1845Vector256<ushort> utf16VectorFirst = Vector256.LoadUnsafe(ref utf16Buffer); 1858nuint currentOffsetInElements = Vector256.Size / 2; // we processed 16 elements so far 1870if (((uint)pAsciiBuffer & (Vector256.Size / 2)) == 0) 1874utf16VectorFirst = Vector256.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 1889currentOffsetInElements = Vector256.Size - ((nuint)pAsciiBuffer & MaskOfAllBitsInVector256); 1891Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= Vector256.Size, "We wrote at least 1 byte but no more than a whole vector."); 1893Debug.Assert(elementCount - currentOffsetInElements >= Vector256.Size, "We should be able to run at least one whole vector."); 1895nuint finalOffsetWhereCanRunLoop = elementCount - Vector256.Size; 1900utf16VectorFirst = Vector256.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 1901Vector256<ushort> utf16VectorSecond = Vector256.LoadUnsafe(ref utf16Buffer, currentOffsetInElements + Vector256.Size / sizeof(short)); 1911Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector256.Size == 0, "Write should be aligned."); 1915currentOffsetInElements += Vector256.Size; 1937currentOffsetInElements += Vector256.Size / 2; 2052Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector256.Size == 0, "Destination should be 256-bit-aligned."); 2079else if (Vector256.IsHardwareAccelerated && (elementCount - currentOffset) >= (uint)Vector256<byte>.Count) 2251(Vector256<ushort> Lower256, Vector256<ushort> Upper256) = Vector256.Widen((Vector256<byte>)(object)vector);
System.Runtime.Intrinsics (1)
artifacts\obj\System.Runtime.Intrinsics\Debug\net10.0\System.Runtime.Intrinsics.Forwards.cs (1)
16[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Intrinsics.Vector256))]
System.Runtime.Numerics (3)
System\Numerics\NumericsHelpers.cs (3)
136while (Vector256.IsHardwareAccelerated && d.Length - offset >= Vector256<uint>.Count) 138Vector256<uint> complement = ~Vector256.LoadUnsafe(ref start, (nuint)offset); 139Vector256.StoreUnsafe(complement, ref start, (nuint)offset);