2117 references to Vector256
GenerateDocumentationAndConfigFiles (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.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);
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 (1053)
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)
90if (TTernaryOperator.Vectorizable && Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported) 421Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 422Vector256.LoadUnsafe(ref yRef), 423Vector256.LoadUnsafe(ref zRef)); 424Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 425Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 426Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 483vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 484Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 485Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 0))); 486vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 487Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 488Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 1))); 489vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 490Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 491Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 2))); 492vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 493Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 494Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 3))); 503vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 504Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 505Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 4))); 506vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 507Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 508Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 5))); 509vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 510Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 511Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 6))); 512vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 513Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 514Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 7))); 538vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 539Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 540Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 0))); 541vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 542Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 543Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 1))); 544vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 545Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 546Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 2))); 547vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 548Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 549Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 3))); 558vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 559Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 560Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 4))); 561vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 562Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 563Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 5))); 564vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 565Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 566Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 6))); 567vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 568Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 569Vector256.Load(zPtr + (uint)(Vector256<T>.Count * 7))); 611Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8)), 612Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 8)), 613Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 8))); 620Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 621Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 7)), 622Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 7))); 629Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 630Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 6)), 631Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 6))); 638Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 639Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 5)), 640Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 5))); 647Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 648Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 4)), 649Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 4))); 656Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 657Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 3)), 658Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 3))); 665Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 666Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 2)), 667Vector256.LoadUnsafe(ref zRef, remainder - (uint)(Vector256<T>.Count * 2))); 1023Debug.Assert(Vector256.IsHardwareAccelerated); 1025Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1026Vector256.LoadUnsafe(ref yRef), 1027Vector256.LoadUnsafe(ref zRef)); 1028Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1029Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1030Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1041Debug.Assert(Vector256.IsHardwareAccelerated); 1043Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1044Vector256.LoadUnsafe(ref yRef), 1045Vector256.LoadUnsafe(ref zRef)); 1215Debug.Assert(Vector256.IsHardwareAccelerated); 1217Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1218Vector256.LoadUnsafe(ref yRef), 1219Vector256.LoadUnsafe(ref zRef)); 1220Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1221Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1222Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1233Debug.Assert(Vector256.IsHardwareAccelerated); 1235Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1236Vector256.LoadUnsafe(ref yRef), 1237Vector256.LoadUnsafe(ref zRef)); 1342Debug.Assert(Vector256.IsHardwareAccelerated); 1344Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1345Vector256.LoadUnsafe(ref yRef), 1346Vector256.LoadUnsafe(ref zRef)); 1347Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1348Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1349Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1359Debug.Assert(Vector256.IsHardwareAccelerated); 1361Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1362Vector256.LoadUnsafe(ref yRef), 1363Vector256.LoadUnsafe(ref zRef)); 1440Debug.Assert(Vector256.IsHardwareAccelerated); 1442Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1443Vector256.LoadUnsafe(ref yRef), 1444Vector256.LoadUnsafe(ref zRef)); 1445Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1446Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1447Vector256.LoadUnsafe(ref zRef, remainder - (uint)Vector256<T>.Count)); 1457Debug.Assert(Vector256.IsHardwareAccelerated); 1459Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1460Vector256.LoadUnsafe(ref yRef), 1461Vector256.LoadUnsafe(ref zRef)); 1565if (TTernaryOperator.Vectorizable && Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported) 1892Vector256<T> zVec = Vector256.Create(z); 1894Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 1895Vector256.LoadUnsafe(ref yRef), 1897Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 1898Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 1953vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 1954Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 1956vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 1957Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 1959vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 1960Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 1962vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 1963Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 1973vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 1974Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 1976vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 1977Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 1979vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 1980Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 1982vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 1983Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 2007vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 2008Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 0)), 2010vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 2011Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 1)), 2013vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 2014Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 2)), 2016vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 2017Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 3)), 2027vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 2028Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 4)), 2030vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 2031Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 5)), 2033vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 2034Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 6)), 2036vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 2037Vector256.Load(yPtr + (uint)(Vector256<T>.Count * 7)), 2078Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8)), 2079Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 8)), 2087Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 2088Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 7)), 2096Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 2097Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 6)), 2105Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 2106Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 5)), 2114Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 2115Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 4)), 2123Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 2124Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 3)), 2132Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 2133Vector256.LoadUnsafe(ref yRef, remainder - (uint)(Vector256<T>.Count * 2)), 2486Debug.Assert(Vector256.IsHardwareAccelerated); 2488Vector256<T> zVec = Vector256.Create(z); 2490Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2491Vector256.LoadUnsafe(ref yRef), 2493Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2494Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2506Debug.Assert(Vector256.IsHardwareAccelerated); 2508Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2509Vector256.LoadUnsafe(ref yRef), 2510Vector256.Create(z)); 2682Debug.Assert(Vector256.IsHardwareAccelerated); 2684Vector256<T> zVec = Vector256.Create(z); 2686Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2687Vector256.LoadUnsafe(ref yRef), 2689Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2690Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2702Debug.Assert(Vector256.IsHardwareAccelerated); 2704Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2705Vector256.LoadUnsafe(ref yRef), 2706Vector256.Create(z)); 2813Debug.Assert(Vector256.IsHardwareAccelerated); 2815Vector256<T> zVec = Vector256.Create(z); 2817Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2818Vector256.LoadUnsafe(ref yRef), 2820Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2821Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2832Debug.Assert(Vector256.IsHardwareAccelerated); 2834Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2835Vector256.LoadUnsafe(ref yRef), 2836Vector256.Create(z)); 2915Debug.Assert(Vector256.IsHardwareAccelerated); 2917Vector256<T> zVec = Vector256.Create(z); 2919Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2920Vector256.LoadUnsafe(ref yRef), 2922Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 2923Vector256.LoadUnsafe(ref yRef, remainder - (uint)Vector256<T>.Count), 2934Debug.Assert(Vector256.IsHardwareAccelerated); 2936Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 2937Vector256.LoadUnsafe(ref yRef), 2938Vector256.Create(z)); 3051if (TTernaryOperator.Vectorizable && Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported) 3373Vector256<T> yVec = Vector256.Create(y); 3374Vector256<T> zVec = Vector256.Create(z); 3376Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 3379Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 3432vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 3435vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 3438vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 3441vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 3452vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 3455vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 3458vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 3461vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 3485vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 0)), 3488vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 1)), 3491vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 2)), 3494vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 3)), 3505vector1 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 4)), 3508vector2 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 5)), 3511vector3 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 6)), 3514vector4 = TTernaryOperator.Invoke(Vector256.Load(xPtr + (uint)(Vector256<T>.Count * 7)), 3554Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 8)), 3563Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 7)), 3572Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 6)), 3581Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 5)), 3590Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 4)), 3599Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 3)), 3608Vector256<T> vector = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)(Vector256<T>.Count * 2)), 3957Debug.Assert(Vector256.IsHardwareAccelerated); 3959Vector256<T> yVec = Vector256.Create(y); 3960Vector256<T> zVec = Vector256.Create(z); 3962Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 3965Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 3978Debug.Assert(Vector256.IsHardwareAccelerated); 3980Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 3981Vector256.Create(y), 3982Vector256.Create(z)); 4155Debug.Assert(Vector256.IsHardwareAccelerated); 4157Vector256<T> yVec = Vector256.Create(y); 4158Vector256<T> zVec = Vector256.Create(z); 4160Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4163Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 4176Debug.Assert(Vector256.IsHardwareAccelerated); 4178Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4179Vector256.Create(y), 4180Vector256.Create(z)); 4288Debug.Assert(Vector256.IsHardwareAccelerated); 4290Vector256<T> yVec = Vector256.Create(y); 4291Vector256<T> zVec = Vector256.Create(z); 4293Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4296Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 4308Debug.Assert(Vector256.IsHardwareAccelerated); 4310Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4311Vector256.Create(y), 4312Vector256.Create(z)); 4392Debug.Assert(Vector256.IsHardwareAccelerated); 4394Vector256<T> yVec = Vector256.Create(y); 4395Vector256<T> zVec = Vector256.Create(z); 4397Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4400Vector256<T> end = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, remainder - (uint)Vector256<T>.Count), 4412Debug.Assert(Vector256.IsHardwareAccelerated); 4414Vector256<T> beg = TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef), 4415Vector256.Create(y), 4416Vector256.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)
81Vector256<T> abs = Vector256.ConditionalSelect(Vector256.LessThan(x, Vector256<T>.Zero), -x, x); 82if (Vector256.LessThan(abs, Vector256<T>.Zero) != Vector256<T>.Zero) 88return 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)
73public 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)
55return Vector256.Ceiling(x.AsSingle()).As<float, T>(); 60return Vector256.Ceiling(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Clamp.cs (3)
226public static Vector256<T> Invoke(Vector256<T> x, Vector256<T> min, Vector256<T> max) => Vector256.Clamp(x, min, max); 274public static Vector256<T> Invoke(Vector256<T> min, Vector256<T> max, Vector256<T> x) => Vector256.Clamp(x, min, max); 323public 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 (6)
61return Vector256.IsNegative(Vector256<TTo>.AllBitsSet) != Vector256<TTo>.Zero ? 62Vector256.ConvertToInt32(x.AsSingle()).As<int, TTo>() : 63Vector256.ConvertToUInt32(x.AsSingle()).As<uint, TTo>(); 68return Vector256.IsNegative(Vector256<TTo>.AllBitsSet) != Vector256<TTo>.Zero ? 69Vector256.ConvertToInt64(x.AsDouble()).As<long, TTo>() : 70Vector256.ConvertToUInt64(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (6)
60return Vector256.IsNegative(Vector256<TTo>.AllBitsSet) != Vector256<TTo>.Zero ? 61Vector256.ConvertToInt32Native(x.AsSingle()).As<int, TTo>() : 62Vector256.ConvertToUInt32Native(x.AsSingle()).As<uint, TTo>(); 67return Vector256.IsNegative(Vector256<TTo>.AllBitsSet) != Vector256<TTo>.Zero ? 68Vector256.ConvertToInt64Native(x.AsDouble()).As<long, TTo>() : 69Vector256.ConvertToUInt64Native(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (10)
115public static Vector256<int> Invoke(Vector256<float> x) => Vector256.ConvertToInt32(x); 131public static Vector256<uint> Invoke(Vector256<float> x) => Vector256.ConvertToUInt32(x); 147public static Vector256<ulong> Invoke(Vector256<double> x) => Vector256.ConvertToUInt64(x); 163public static Vector256<long> Invoke(Vector256<double> x) => Vector256.ConvertToInt64(x); 174public static Vector256<byte> Invoke(Vector256<ushort> lower, Vector256<ushort> upper) => Vector256.Narrow(lower, upper); 185public static Vector256<sbyte> Invoke(Vector256<short> lower, Vector256<short> upper) => Vector256.Narrow(lower, upper); 196public static Vector256<ushort> Invoke(Vector256<uint> lower, Vector256<uint> upper) => Vector256.Narrow(lower, upper); 207public static Vector256<short> Invoke(Vector256<int> lower, Vector256<int> upper) => Vector256.Narrow(lower, upper); 218public static Vector256<uint> Invoke(Vector256<ulong> lower, Vector256<ulong> upper) => Vector256.Narrow(lower, upper); 229public static Vector256<int> Invoke(Vector256<long> lower, Vector256<long> upper) => Vector256.Narrow(lower, upper);
System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs (1)
97return Vector256.CopySign(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (2)
106return Vector256.Cos(x.AsDouble()).As<double, T>(); 111return Vector256.Cos(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (8)
107Vector256<float> y = Vector256.Abs(x); 108Vector256<float> z = ExpOperator<float>.Invoke(y - Vector256.Create((float)Single_LOGV)); 109return (Vector256.Create((float)Single_HALFV) * (z + (Vector256.Create((float)Single_INVV2) / z))).As<float, T>(); 116Vector256<double> y = Vector256.Abs(x); 117Vector256<double> z = ExpOperator<double>.Invoke(y - Vector256.Create(Double_LOGV)); 118return (Vector256.Create(Double_HALFV) * (z + (Vector256.Create(Double_INVV2) / z))).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (13)
98if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && x.Length >= Vector256<T>.Count) 113Vector256.LoadUnsafe(ref xRef, (uint)i), 114Vector256.LoadUnsafe(ref yRef, (uint)i), 127Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<T>.Count)) & remainderMask, 128Vector256.LoadUnsafe(ref yRef, (uint)(x.Length - Vector256<T>.Count)) & remainderMask, 243if (Vector256.IsHardwareAccelerated && x.Length >= Vector256<short>.Count) 258(Vector256<float> xVecLower, Vector256<float> xVecUpper) = WidenHalfAsInt16ToSingleOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i)); 259(Vector256<float> yVecLower, Vector256<float> yVecUpper) = WidenHalfAsInt16ToSingleOperator.Invoke(Vector256.LoadUnsafe(ref yRef, (uint)i)); 274Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<short>.Count)) & remainderMask); 276Vector256.LoadUnsafe(ref yRef, (uint)(x.Length - Vector256<short>.Count)) & remainderMask); 380Vector256.Sum(dotProductVector) / (T.Sqrt(Vector256.Sum(xSumOfSquaresVector)) * T.Sqrt(Vector256.Sum(ySumOfSquaresVector)));
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (7)
73Vector256<T> xpi = x * Vector256.Create(T.Pi); 77if (Vector256.GreaterThanAny(xpi.AsUInt32() & Vector256.Create(CosOperatorSingle.SignMask), Vector256.Create(CosOperatorSingle.MaxVectorizedValue))) 85if (Vector256.GreaterThanAny(xpi.AsUInt64() & Vector256.Create(CosOperatorDouble.SignMask), Vector256.Create(CosOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (2)
61return Vector256.DegreesToRadians(x.AsDouble()).As<double, T>(); 66return Vector256.DegreesToRadians(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Divide.cs (1)
94|| (Vector256.IsHardwareAccelerated && IsInt32Like<T>());
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (2)
79return Vector256.Exp(x.AsDouble()).As<double, T>(); 84return Vector256.Exp(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs (1)
45public static Vector256<T> Invoke(Vector256<T> x) => ExpOperator<T>.Invoke(x * Vector256.Create(T.CreateTruncating(NaturalLog10)));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs (1)
45public 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)
55return Vector256.Floor(x.AsSingle()).As<float, T>(); 60return Vector256.Floor(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (2)
182return Vector256.FusedMultiplyAdd(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 187return 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)
65return Vector256.Hypot(x.AsDouble(), y.AsDouble()).As<double, T>(); 70return 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)
125return Vector256.Lerp(x.AsDouble(), y.AsDouble(), amount.AsDouble()).As<double, T>(); 130return Vector256.Lerp(x.AsSingle(), y.AsSingle(), amount.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (2)
135return Vector256.Log(x.AsDouble()).As<double, T>(); 140return Vector256.Log(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (1)
49public static Vector256<T> Invoke(Vector256<T> x) => LogOperator<T>.Invoke(x) / Vector256.Create(T.CreateTruncating(NaturalLog10));
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (2)
81return Vector256.Log2(x.AsDouble()).As<double, T>(); 86return Vector256.Log2(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (11)
141return Vector256.Max(x, y); 186return Vector256.IsNaN(vector); 246return Vector256.IsNegative(vector); 336return Vector256.IsPositive(vector); 474if (Vector256.IsHardwareAccelerated && Vector256<T>.IsSupported && x.Length >= Vector256<T>.Count) 480Vector256<T> result = Vector256.LoadUnsafe(ref xRef, 0); 487nanMask = ~Vector256.Equals(result, result); 501current = Vector256.LoadUnsafe(ref xRef, (uint)i); 506nanMask = ~Vector256.Equals(current, current); 520current = Vector256.LoadUnsafe(ref xRef, (uint)(x.Length - Vector256<T>.Count)); 526nanMask = ~Vector256.Equals(current, current);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs (1)
121return Vector256.MaxMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitudeNumber.cs (1)
157return Vector256.MaxMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxNumber.cs (1)
130return Vector256.MaxNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs (1)
139return Vector256.Min(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs (1)
132return Vector256.MinMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitudeNumber.cs (1)
156return Vector256.MinMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinNumber.cs (1)
130return Vector256.MinNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (2)
185return Vector256.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 189return 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)
114public static Vector256<T> Invoke(Vector256<T> x) => Vector256<T>.One / Vector256.Sqrt(x); 233return 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)
215return Vector256.Round(x.AsDouble()).As<double, T>(); 220return Vector256.Round(x.AsSingle()).As<float, T>(); 283return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector256.Create(0.49999997f), x.AsSingle())).As<float, T>(); 288return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector256.Create(0.49999999999999994), x.AsDouble())).As<double, T>(); 342Vector256<T> limit = Vector256.Create(typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit)); 343return 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)
47public 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)
69return Vector256.ConditionalSelect(Vector256.Equals(x, Vector256<T>.Zero).AsInt32(), 80if (Vector256.EqualsAny(IsNaN(x).AsInt32(), Vector256<int>.AllBitsSet)) 85return Vector256.ConditionalSelect(Vector256.LessThan(x, Vector256<T>.Zero).AsInt32(), 86Vector256.Create(-1), 87Vector256.ConditionalSelect(Vector256.GreaterThan(x, Vector256<T>.Zero).AsInt32(),
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (2)
95return Vector256.Sin(x.AsDouble()).As<double, T>(); 100return Vector256.Sin(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (10)
93Vector256<float> y = Vector256.Abs(x); 94Vector256<float> z = ExpOperator<float>.Invoke(y - Vector256.Create((float)Single_LOGV)); 95Vector256<float> result = Vector256.Create((float)Single_HALFV) * (z - (Vector256.Create((float)Single_INVV2) / z)); 96Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 104Vector256<double> y = Vector256.Abs(x); 105Vector256<double> z = ExpOperator<double>.Invoke(y - Vector256.Create(Double_LOGV)); 106Vector256<double> result = Vector256.Create(Double_HALFV) * (z - (Vector256.Create(Double_INVV2) / z)); 107Vector256<ulong> sign = x.AsUInt64() & Vector256.Create(~(ulong)long.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (7)
73Vector256<T> xpi = x * Vector256.Create(T.Pi); 77if (Vector256.GreaterThanAny(xpi.AsUInt32() & Vector256.Create(SinOperatorSingle.SignMask), Vector256.Create(SinOperatorSingle.MaxVectorizedValue))) 85if (Vector256.GreaterThanAny(xpi.AsUInt64() & Vector256.Create(SinOperatorDouble.SignMask), Vector256.Create(SinOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.Sqrt.cs (1)
38public 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)
165Vector256<float> uxMasked = Vector256.Abs(x); 166if (Vector256.GreaterThanAny(uxMasked.AsUInt32(), Vector256.Create(MaxVectorizedValue))) 171Vector256<float> dn = MultiplyAddEstimateOperator<float>.Invoke(uxMasked, Vector256.Create(2 / float.Pi), Vector256.Create(AlmHuge)); 173dn -= Vector256.Create(AlmHuge); 176f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector256.Create(-float.Pi / 2), f); 177f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector256.Create(Pi_Tail2), f); 178f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector256.Create(Pi_Tail3), f); 185Vector256<float> a1 = MultiplyAddEstimateOperator<float>.Invoke(Vector256.Create(C2), f2, Vector256.Create(C1)); 186Vector256<float> a2 = MultiplyAddEstimateOperator<float>.Invoke(Vector256.Create(C4), f2, Vector256.Create(C3)); 187Vector256<float> a3 = MultiplyAddEstimateOperator<float>.Invoke(Vector256.Create(C6), f2, Vector256.Create(C5)); 189Vector256<float> b2 = MultiplyAddEstimateOperator<float>.Invoke(f8, a3, f12 * Vector256.Create(C7)); 192Vector256<float> result = (poly.AsUInt32() ^ (x.AsUInt32() & Vector256.Create(~SignMask))).AsSingle(); 193return Vector256.ConditionalSelect(Vector256.Equals(odd, Vector256<uint>.Zero).AsSingle(), 195Vector256.Create(-1f) / result); 310Vector256<double> uxMasked = Vector256.Abs(x); 311if (Vector256.GreaterThanAny(uxMasked.AsUInt64(), Vector256.Create(MaxVectorizedValue))) 317Vector256<double> dn = MultiplyAddEstimateOperator<double>.Invoke(uxMasked, Vector256.Create(2 / double.Pi), Vector256.Create(AlmHuge)); 319dn -= Vector256.Create(AlmHuge); 323f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector256.Create(-double.Pi / 2), f); 324f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector256.Create(-HalfPi2), f); 325f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector256.Create(-HalfPi3), f); 336Vector256<double> a1 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C3), g, Vector256.Create(C1)); 337Vector256<double> a2 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C7), g, Vector256.Create(C5)); 338Vector256<double> a3 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C11), g, Vector256.Create(C9)); 339Vector256<double> a4 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C15), g, Vector256.Create(C13)); 340Vector256<double> a5 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C19), g, Vector256.Create(C17)); 341Vector256<double> a6 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C23), g, Vector256.Create(C21)); 342Vector256<double> a7 = MultiplyAddEstimateOperator<double>.Invoke(Vector256.Create(C27), g, Vector256.Create(C25)); 349Vector256<double> result = (poly.AsUInt64() ^ (x.AsUInt64() & Vector256.Create(~SignMask))).AsDouble(); 350return Vector256.ConditionalSelect(Vector256.Equals(odd, Vector256<ulong>.Zero).AsDouble(), 352Vector256.Create(-1.0) / result);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (8)
98Vector256<float> y = Vector256.Abs(x); 99Vector256<float> z = ExpM1Operator<float>.Invoke(Vector256.Create(-2f) * y); 100Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 101return (sign ^ (-z / (z + Vector256.Create(2f))).AsUInt32()).As<uint, T>(); 107Vector256<double> y = Vector256.Abs(x); 108Vector256<double> z = ExpM1Operator<double>.Invoke(Vector256.Create(-2d) * y); 109Vector256<ulong> sign = x.AsUInt64() & Vector256.Create(~(ulong)long.MaxValue); 110return (sign ^ (-z / (z + Vector256.Create(2d))).AsUInt64()).As<ulong, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
81return Vector256.Truncate(x.AsDouble()).As<double, T>(); 86return 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\Collections\BitArray.cs (10)
182else if (Vector256.IsHardwareAccelerated) 186Vector256<byte> vector = Vector256.LoadUnsafe(ref value, i); 187Vector256<byte> isFalse = Vector256.Equals(vector, Vector256<byte>.Zero); 427else if (Vector256.IsHardwareAccelerated) 742Vector256<byte> upperShuffleMask_CopyToBoolArray256 = Vector256.Create(0x04040404_04040404, 0x05050505_05050505, 744Vector256<byte> lowerShuffleMask_CopyToBoolArray256 = Vector256.Create(lowerShuffleMask_CopyToBoolArray, upperShuffleMask_CopyToBoolArray); 767Vector256<byte> shuffleMask = Vector256.Create(lowerShuffleMask_CopyToBoolArray, upperShuffleMask_CopyToBoolArray); 768Vector256<byte> bitMask = Vector256.Create(0x80402010_08040201).AsByte(); 769Vector256<byte> ones = Vector256.Create((byte)1); 776Vector256<int> scalar = Vector256.Create(bits);
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)
406return Vector256.ConvertToDouble(value.AsVector256()).AsVector(); 429return Vector256.ConvertToDouble(value.AsVector256()).AsVector(); 537return Vector256.ConvertToSingle(value.AsVector256()).AsVector(); 704return Vector256.Count(vector.AsVector256(), value); 1361return Vector256.IndexOf(vector.AsVector256(), value); 1607return Vector256.LastIndexOf(vector.AsVector256(), value); 2658return Vector256.ShiftLeft(vector.AsVector256(), shiftCount.AsVector256()).AsVector(); 2684return Vector256.ShiftLeft(vector.AsVector256(), shiftCount.AsVector256()).AsVector();
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (5)
749if (Vector256.IsHardwareAccelerated) 1575if (Vector256.IsHardwareAccelerated) 1829if (Vector256.IsHardwareAccelerated) 3728if (Vector256.IsHardwareAccelerated) 3772if (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 (265)
74Vector256.Abs(vector._lower), 75Vector256.Abs(vector._upper) 96Vector256.AddSaturate(left._lower, right._lower), 97Vector256.AddSaturate(left._upper, right._upper) 102/// <inheritdoc cref="Vector256.All{T}(Vector256{T}, T)" /> 107/// <inheritdoc cref="Vector256.AllWhereAllBitsSet{T}(Vector256{T})" /> 136/// <inheritdoc cref="Vector256.Any{T}(Vector256{T}, T)" /> 141/// <inheritdoc cref="Vector256.AnyWhereAllBitsSet{T}(Vector256{T})" /> 355Vector256.Ceiling(vector._lower), 356Vector256.Ceiling(vector._upper) 375/// <inheritdoc cref="Vector256.Clamp{T}(Vector256{T}, Vector256{T}, Vector256{T})" /> 383/// <inheritdoc cref="Vector256.ClampNative{T}(Vector256{T}, Vector256{T}, Vector256{T})" /> 411Vector256.ConvertToDouble(vector._lower), 412Vector256.ConvertToDouble(vector._upper) 425Vector256.ConvertToDouble(vector._lower), 426Vector256.ConvertToDouble(vector._upper) 438Vector256.ConvertToInt32(vector._lower), 439Vector256.ConvertToInt32(vector._upper) 451Vector256.ConvertToInt32Native(vector._lower), 452Vector256.ConvertToInt32Native(vector._upper) 464Vector256.ConvertToInt64(vector._lower), 465Vector256.ConvertToInt64(vector._upper) 477Vector256.ConvertToInt64Native(vector._lower), 478Vector256.ConvertToInt64Native(vector._upper) 490Vector256.ConvertToSingle(vector._lower), 491Vector256.ConvertToSingle(vector._upper) 504Vector256.ConvertToSingle(vector._lower), 505Vector256.ConvertToSingle(vector._upper) 518Vector256.ConvertToUInt32(vector._lower), 519Vector256.ConvertToUInt32(vector._upper) 532Vector256.ConvertToUInt32Native(vector._lower), 533Vector256.ConvertToUInt32Native(vector._upper) 546Vector256.ConvertToUInt64(vector._lower), 547Vector256.ConvertToUInt64(vector._upper) 560Vector256.ConvertToUInt64Native(vector._lower), 561Vector256.ConvertToUInt64Native(vector._upper) 565/// <inheritdoc cref="Vector256.CopySign{T}(Vector256{T}, Vector256{T})" /> 585Vector256.CopySign(value._lower, sign._lower), 586Vector256.CopySign(value._upper, sign._upper) 652/// <inheritdoc cref="Vector256.Cos(Vector256{double})" /> 663Vector256.Cos(vector._lower), 664Vector256.Cos(vector._upper) 669/// <inheritdoc cref="Vector256.Cos(Vector256{float})" /> 680Vector256.Cos(vector._lower), 681Vector256.Cos(vector._upper) 686/// <inheritdoc cref="Vector256.Count{T}(Vector256{T}, T)" /> 691/// <inheritdoc cref="Vector256.CountWhereAllBitsSet{T}(Vector256{T})" /> 718Vector256<T> vector = Vector256.Create(value); 940Vector256.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), 941Vector256.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) 961Vector256.Create(e0, e1, e2, e3), 962Vector256.Create(e4, e5, e6, e7) 1007Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 1008Vector256.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1036Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1037Vector256.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1057Vector256.Create(e0, e1, e2, e3), 1058Vector256.Create(e4, e5, e6, e7) 1138Vector256.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), 1139Vector256.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) 1167Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1168Vector256.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1214Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15), 1215Vector256.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) 1244Vector256.Create(e0, e1, e2, e3, e4, e5, e6, e7), 1245Vector256.Create(e8, e9, e10, e11, e12, e13, e14, e15) 1266Vector256.Create(e0, e1, e2, e3), 1267Vector256.Create(e4, e5, e6, e7) 1285public static Vector512<T> Create<T>(Vector128<T> value) => Create(Vector256.Create(value, value)); 1400public static Vector512<T> CreateScalar<T>(T value) => Vector256.CreateScalar(value).ToVector512(); 1584/// <inheritdoc cref="Vector256.DegreesToRadians(Vector256{double})" /> 1596Vector256.DegreesToRadians(degrees._lower), 1597Vector256.DegreesToRadians(degrees._upper) 1602/// <inheritdoc cref="Vector256.DegreesToRadians(Vector256{float})" /> 1614Vector256.DegreesToRadians(degrees._lower), 1615Vector256.DegreesToRadians(degrees._upper) 1659Vector256.Equals(left._lower, right._lower), 1660Vector256.Equals(left._upper, right._upper) 1683return Vector256.EqualsAny(left._lower, right._lower) 1684|| Vector256.EqualsAny(left._upper, right._upper); 1687/// <inheritdoc cref="Vector256.Exp(Vector256{double})" /> 1698Vector256.Exp(vector._lower), 1699Vector256.Exp(vector._upper) 1704/// <inheritdoc cref="Vector256.Exp(Vector256{float})" /> 1715Vector256.Exp(vector._lower), 1716Vector256.Exp(vector._upper) 1759Vector256.Floor(vector._lower), 1760Vector256.Floor(vector._upper) 1779/// <inheritdoc cref="Vector256.FusedMultiplyAdd(Vector256{double}, Vector256{double}, Vector256{double})" /> 1785Vector256.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 1786Vector256.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 1790/// <inheritdoc cref="Vector256.FusedMultiplyAdd(Vector256{float}, Vector256{float}, Vector256{float})" /> 1796Vector256.FusedMultiplyAdd(left._lower, right._lower, addend._lower), 1797Vector256.FusedMultiplyAdd(left._upper, right._upper, addend._upper) 1855Vector256.GreaterThan(left._lower, right._lower), 1856Vector256.GreaterThan(left._upper, right._upper) 1870return Vector256.GreaterThanAll(left._lower, right._lower) 1871&& Vector256.GreaterThanAll(left._upper, right._upper); 1884return Vector256.GreaterThanAny(left._lower, right._lower) 1885|| Vector256.GreaterThanAny(left._upper, right._upper); 1899Vector256.GreaterThanOrEqual(left._lower, right._lower), 1900Vector256.GreaterThanOrEqual(left._upper, right._upper) 1914return Vector256.GreaterThanOrEqualAll(left._lower, right._lower) 1915&& Vector256.GreaterThanOrEqualAll(left._upper, right._upper); 1928return Vector256.GreaterThanOrEqualAny(left._lower, right._lower) 1929|| Vector256.GreaterThanOrEqualAny(left._upper, right._upper); 1932/// <inheritdoc cref="Vector256.Hypot(Vector256{double}, Vector256{double})" /> 1943Vector256.Hypot(x._lower, y._lower), 1944Vector256.Hypot(x._upper, y._upper) 1949/// <inheritdoc cref="Vector256.Hypot(Vector256{float}, Vector256{float})" /> 1960Vector256.Hypot(x._lower, y._lower), 1961Vector256.Hypot(x._upper, y._upper) 1966/// <inheritdoc cref="Vector256.IndexOf{T}(Vector256{T}, T)" /> 1975/// <inheritdoc cref="Vector256.IndexOfWhereAllBitsSet{T}(Vector256{T})" /> 1994/// <inheritdoc cref="Vector256.IsEvenInteger{T}(Vector256{T})" /> 2010/// <inheritdoc cref="Vector256.IsFinite{T}(Vector256{T})" /> 2026/// <inheritdoc cref="Vector256.IsInfinity{T}(Vector256{T})" /> 2038/// <inheritdoc cref="Vector256.IsInteger{T}(Vector256{T})" /> 2050/// <inheritdoc cref="Vector256.IsNaN{T}(Vector256{T})" /> 2062/// <inheritdoc cref="Vector256.IsNegative{T}(Vector256{T})" /> 2089/// <inheritdoc cref="Vector256.IsNegativeInfinity{T}(Vector256{T})" /> 2105/// <inheritdoc cref="Vector256.IsNormal{T}(Vector256{T})" /> 2121/// <inheritdoc cref="Vector256.IsOddInteger{T}(Vector256{T})" /> 2137/// <inheritdoc cref="Vector256.IsPositive{T}(Vector256{T})" /> 2164/// <inheritdoc cref="Vector256.IsPositiveInfinity{T}(Vector256{T})" /> 2180/// <inheritdoc cref="Vector256.IsSubnormal{T}(Vector256{T})" /> 2196/// <inheritdoc cref="Vector256.IsZero{T}(Vector256{T})" /> 2201/// <inheritdoc cref="Vector256.LastIndexOf{T}(Vector256{T}, T)" /> 2206/// <inheritdoc cref="Vector256.LastIndexOfWhereAllBitsSet{T}(Vector256{T})" /> 2225/// <inheritdoc cref="Vector256.Lerp(Vector256{double}, Vector256{double}, Vector256{double})" /> 2237Vector256.Lerp(x._lower, y._lower, amount._lower), 2238Vector256.Lerp(x._upper, y._upper, amount._upper) 2243/// <inheritdoc cref="Vector256.Lerp(Vector256{float}, Vector256{float}, Vector256{float})" /> 2255Vector256.Lerp(x._lower, y._lower, amount._lower), 2256Vector256.Lerp(x._upper, y._upper, amount._upper) 2272Vector256.LessThan(left._lower, right._lower), 2273Vector256.LessThan(left._upper, right._upper) 2287return Vector256.LessThanAll(left._lower, right._lower) 2288&& Vector256.LessThanAll(left._upper, right._upper); 2301return Vector256.LessThanAny(left._lower, right._lower) 2302|| Vector256.LessThanAny(left._upper, right._upper); 2316Vector256.LessThanOrEqual(left._lower, right._lower), 2317Vector256.LessThanOrEqual(left._upper, right._upper) 2331return Vector256.LessThanOrEqualAll(left._lower, right._lower) 2332&& Vector256.LessThanOrEqualAll(left._upper, right._upper); 2345return Vector256.LessThanOrEqualAny(left._lower, right._lower) 2346|| Vector256.LessThanOrEqualAny(left._upper, right._upper); 2429/// <inheritdoc cref="Vector256.Log(Vector256{double})" /> 2440Vector256.Log(vector._lower), 2441Vector256.Log(vector._upper) 2446/// <inheritdoc cref="Vector256.Log(Vector256{float})" /> 2457Vector256.Log(vector._lower), 2458Vector256.Log(vector._upper) 2463/// <inheritdoc cref="Vector256.Log2(Vector256{double})" /> 2474Vector256.Log2(vector._lower), 2475Vector256.Log2(vector._upper) 2480/// <inheritdoc cref="Vector256.Log2(Vector256{float})" /> 2491Vector256.Log2(vector._lower), 2492Vector256.Log2(vector._upper) 2497/// <inheritdoc cref="Vector256.Max{T}(Vector256{T}, Vector256{T})" /> 2509Vector256.Max(left._lower, right._lower), 2510Vector256.Max(left._upper, right._upper) 2515/// <inheritdoc cref="Vector256.MaxMagnitude{T}(Vector256{T}, Vector256{T})" /> 2527Vector256.MaxMagnitude(left._lower, right._lower), 2528Vector256.MaxMagnitude(left._upper, right._upper) 2533/// <inheritdoc cref="Vector256.MaxMagnitudeNumber{T}(Vector256{T}, Vector256{T})" /> 2545Vector256.MaxMagnitudeNumber(left._lower, right._lower), 2546Vector256.MaxMagnitudeNumber(left._upper, right._upper) 2551/// <inheritdoc cref="Vector256.MaxNative{T}(Vector256{T}, Vector256{T})" /> 2563Vector256.MaxNative(left._lower, right._lower), 2564Vector256.MaxNative(left._upper, right._upper) 2569/// <inheritdoc cref="Vector256.MaxNumber{T}(Vector256{T}, Vector256{T})" /> 2581Vector256.MaxNumber(left._lower, right._lower), 2582Vector256.MaxNumber(left._upper, right._upper) 2587/// <inheritdoc cref="Vector256.Min{T}(Vector256{T}, Vector256{T})" /> 2599Vector256.Min(left._lower, right._lower), 2600Vector256.Min(left._upper, right._upper) 2605/// <inheritdoc cref="Vector256.MinMagnitude{T}(Vector256{T}, Vector256{T})" /> 2617Vector256.MinMagnitude(left._lower, right._lower), 2618Vector256.MinMagnitude(left._upper, right._upper) 2623/// <inheritdoc cref="Vector256.MinMagnitudeNumber{T}(Vector256{T}, Vector256{T})" /> 2635Vector256.MinMagnitudeNumber(left._lower, right._lower), 2636Vector256.MinMagnitudeNumber(left._upper, right._upper) 2641/// <inheritdoc cref="Vector256.MinNative{T}(Vector256{T}, Vector256{T})" /> 2653Vector256.MinNative(left._lower, right._lower), 2654Vector256.MinNative(left._upper, right._upper) 2659/// <inheritdoc cref="Vector256.MinNumber{T}(Vector256{T}, Vector256{T})" /> 2671Vector256.MinNumber(left._lower, right._lower), 2672Vector256.MinNumber(left._upper, right._upper) 2709Vector256.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2710Vector256.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2714/// <inheritdoc cref="Vector256.MultiplyAddEstimate(Vector256{double}, Vector256{double}, Vector256{double})" /> 2720Vector256.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2721Vector256.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2725/// <inheritdoc cref="Vector256.MultiplyAddEstimate(Vector256{float}, Vector256{float}, Vector256{float})" /> 2730Vector256.MultiplyAddEstimate(left._lower, right._lower, addend._lower), 2731Vector256.MultiplyAddEstimate(left._upper, right._upper, addend._upper) 2881/// <inheritdoc cref="Vector256.None{T}(Vector256{T}, T)" /> 2886/// <inheritdoc cref="Vector256.NoneWhereAllBitsSet{T}(Vector256{T})" /> 2913/// <inheritdoc cref="Vector256.RadiansToDegrees(Vector256{double})" /> 2925Vector256.RadiansToDegrees(radians._lower), 2926Vector256.RadiansToDegrees(radians._upper) 2931/// <inheritdoc cref="Vector256.RadiansToDegrees(Vector256{float})" /> 2943Vector256.RadiansToDegrees(radians._lower), 2944Vector256.RadiansToDegrees(radians._upper) 2969Vector256.Round(vector._lower), 2970Vector256.Round(vector._upper) 2975/// <inheritdoc cref="Vector256.Round(Vector256{double})" /> 2979/// <inheritdoc cref="Vector256.Round(Vector256{float})" /> 2983/// <inheritdoc cref="Vector256.Round(Vector256{double}, MidpointRounding)" /> 2987/// <inheritdoc cref="Vector256.Round(Vector256{float}, MidpointRounding)" /> 3069Vector256.ShiftLeft(vector._lower, shiftCount._lower), 3070Vector256.ShiftLeft(vector._upper, shiftCount._upper) 3086Vector256.ShiftLeft(vector._lower, shiftCount._lower), 3087Vector256.ShiftLeft(vector._upper, shiftCount._upper) 3722/// <inheritdoc cref="Vector256.Sin(Vector256{double})" /> 3733Vector256.Sin(vector._lower), 3734Vector256.Sin(vector._upper) 3739/// <inheritdoc cref="Vector256.Sin(Vector256{float})" /> 3750Vector256.Sin(vector._lower), 3751Vector256.Sin(vector._upper) 3756/// <inheritdoc cref="Vector256.SinCos(Vector256{double})" /> 3766(Vector256<double> sinLower, Vector256<double> cosLower) = Vector256.SinCos(vector._lower); 3767(Vector256<double> sinUpper, Vector256<double> cosUpper) = Vector256.SinCos(vector._upper); 3776/// <inheritdoc cref="Vector256.SinCos(Vector256{float})" /> 3786(Vector256<float> sinLower, Vector256<float> cosLower) = Vector256.SinCos(vector._lower); 3787(Vector256<float> sinUpper, Vector256<float> cosUpper) = Vector256.SinCos(vector._upper); 3806Vector256.Sqrt(vector._lower), 3807Vector256.Sqrt(vector._upper) 3896Vector256.SubtractSaturate(left._lower, right._lower), 3897Vector256.SubtractSaturate(left._upper, right._upper) 3915T result = Vector256.Sum(vector._lower); 3916result = Scalar<T>.Add(result, Vector256.Sum(vector._upper)); 3952Vector256.Truncate(vector._lower), 3953Vector256.Truncate(vector._upper) 3958/// <inheritdoc cref="Vector256.Truncate(Vector256{double})" /> 3962/// <inheritdoc cref="Vector256.Truncate(Vector256{float})" /> 4040Vector256.WidenLower(lower), 4041Vector256.WidenUpper(lower) 4055Vector256.WidenLower(lower), 4056Vector256.WidenUpper(lower) 4070Vector256.WidenLower(lower), 4071Vector256.WidenUpper(lower) 4086Vector256.WidenLower(lower), 4087Vector256.WidenUpper(lower) 4100Vector256.WidenLower(lower), 4101Vector256.WidenUpper(lower) 4116Vector256.WidenLower(lower), 4117Vector256.WidenUpper(lower) 4132Vector256.WidenLower(lower), 4133Vector256.WidenUpper(lower) 4148Vector256.WidenLower(upper), 4149Vector256.WidenUpper(upper) 4163Vector256.WidenLower(upper), 4164Vector256.WidenUpper(upper) 4178Vector256.WidenLower(upper), 4179Vector256.WidenUpper(upper) 4194Vector256.WidenLower(upper), 4195Vector256.WidenUpper(upper) 4209Vector256.WidenLower(upper), 4210Vector256.WidenUpper(upper) 4225Vector256.WidenLower(upper), 4226Vector256.WidenUpper(upper) 4241Vector256.WidenLower(upper), 4242Vector256.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)
151Vector256<ushort> source0 = Vector256.LoadUnsafe(ref searchSpace0); 152Vector256<ushort> source1 = Vector256.LoadUnsafe(ref searchSpace1); 154Vector256<byte> sourceLower = Avx512Vbmi.VL.PermuteVar32x8x2(source0.AsByte(), Vector256.CreateSequence<byte>(0, 2), source1.AsByte()); 155Vector256<byte> sourceUpper = Avx512Vbmi.VL.PermuteVar32x8x2(source0.AsByte(), Vector256.CreateSequence<byte>(1, 2), source1.AsByte()); 173Vector256<byte> bitPositions = Avx512Vbmi.VL.PermuteVar32x8(Vector256.Create(0x8040201008040201).AsByte(), shifted); 179return Vector256.Equals(bitMask & bitPositions, Vector256<byte>.Zero); 186Vector256<ushort> source0 = Vector256.LoadUnsafe(ref searchSpace); 187Vector256<ushort> source1 = Vector256.LoadUnsafe(ref searchSpace, (nuint)Vector256<ushort>.Count); 190(source0 & Vector256.Create((ushort)255)).AsInt16(), 191(source1 & Vector256.Create((ushort)255)).AsInt16()); 209Vector256<byte> bitPositions = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), shifted); 211Vector256<byte> index = values & Vector256.Create((byte)VectorizedIndexMask); 213Vector256<byte> bitMaskUpper = Avx2.Shuffle(charMapUpper, index - Vector256.Create((byte)16)); 214Vector256<byte> mask = Vector256.GreaterThan(index, Vector256.Create((byte)15)); 215Vector256<byte> bitMask = Vector256.ConditionalSelect(mask, bitMaskUpper, bitMaskLower); 217return Vector256.Equals(bitMask & bitPositions, Vector256<byte>.Zero); 428Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 520Vector256<byte> charMapLower256 = Vector256.Create(charMapLower); 521Vector256<byte> charMapUpper256 = Vector256.Create(charMapUpper); 603Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 697Vector256<byte> charMapLower256 = Vector256.Create(charMapLower); 698Vector256<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)
64vector = Vector256.Create(Unsafe.BitCast<T, Vector128<byte>>(value)).AsVector(); 1399else if (Vector256.IsHardwareAccelerated && length >= Vector256<T>.Count) 1401Vector256<T> equals, values = Vector256.Create(value); 1408equals = Vector256.Equals(values, Vector256.LoadUnsafe(ref currentSearchSpace)); 1422equals = Vector256.Equals(values, Vector256.LoadUnsafe(ref oneVectorAwayFromEnd)); 1590else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 1592Vector256<TValue> equals, values = Vector256.Create(value); 1599equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref currentSearchSpace))); 1613equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref oneVectorAwayFromEnd))); 1816else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 1818Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1); 1825current = Vector256.LoadUnsafe(ref currentSearchSpace); 1826equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current)); 1840current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 1841equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current)); 2023else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2025Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2); 2032current = Vector256.LoadUnsafe(ref currentSearchSpace); 2033equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current)); 2047current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 2048equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current)); 2181else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2183Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2), values3 = Vector256.Create(value3); 2190current = Vector256.LoadUnsafe(ref currentSearchSpace); 2191equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) 2192| Vector256.Equals(values2, current) | Vector256.Equals(values3, current)); 2206current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 2207equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) 2208| Vector256.Equals(values2, current) | Vector256.Equals(values3, current)); 2345else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2347Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), 2348values2 = Vector256.Create(value2), values3 = Vector256.Create(value3), values4 = Vector256.Create(value4); 2355current = Vector256.LoadUnsafe(ref currentSearchSpace); 2356equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current) 2357| Vector256.Equals(values3, current) | Vector256.Equals(values4, current)); 2371current = Vector256.LoadUnsafe(ref oneVectorAwayFromEnd); 2372equals = TNegator.NegateIfNeeded(Vector256.Equals(values0, current) | Vector256.Equals(values1, current) | Vector256.Equals(values2, current) 2373| Vector256.Equals(values3, current) | Vector256.Equals(values4, current)); 2496else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2661else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2663Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1); 2669current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2670equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1)); 2683current = Vector256.LoadUnsafe(ref searchSpace); 2684equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1)); 2846else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2848Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2); 2854current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2855equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2)); 2868current = Vector256.LoadUnsafe(ref searchSpace); 2869equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2)); 2996else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 2998Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2), values3 = Vector256.Create(value3); 3004current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3005equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) 3006| Vector256.Equals(current, values2) | Vector256.Equals(current, values3)); 3018current = Vector256.LoadUnsafe(ref searchSpace); 3019equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2) | Vector256.Equals(current, values3)); 3098if (!Vector256.IsHardwareAccelerated || length < (uint)Vector256<T>.Count) 3129Vector256<T> oldValues = Vector256.Create(oldValue); 3130Vector256<T> newValues = Vector256.Create(newValue); 3135original = Vector256.LoadUnsafe(ref src, idx); 3136mask = Vector256.Equals(oldValues, original); 3137result = Vector256.ConditionalSelect(mask, newValues, original); 3144original = Vector256.LoadUnsafe(ref src, lastVectorIndex); 3145mask = Vector256.Equals(oldValues, original); 3146result = Vector256.ConditionalSelect(mask, newValues, original); 3256else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count) 3258Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), 3259values2 = Vector256.Create(value2), values3 = Vector256.Create(value3), values4 = Vector256.Create(value4); 3265current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3266equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2) 3267| Vector256.Equals(current, values3) | Vector256.Equals(current, values4)); 3279current = Vector256.LoadUnsafe(ref searchSpace); 3280equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2) 3281| Vector256.Equals(current, values3) | Vector256.Equals(current, values4)); 3513else if (!Vector256.IsHardwareAccelerated || length < Vector256<T>.Count) 3544Vector256<T> lowVector = Vector256.Create(lowInclusive); 3545Vector256<T> rangeVector = Vector256.Create(highInclusive - lowInclusive); 3554inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref current) - lowVector, rangeVector)); 3565inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref oneVectorAwayFromEnd) - lowVector, rangeVector)); 3660else if (!Vector256.IsHardwareAccelerated || length < Vector256<T>.Count) 3689Vector256<T> lowVector = Vector256.Create(lowInclusive); 3690Vector256<T> rangeVector = Vector256.Create(highInclusive - lowInclusive); 3698inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref searchSpace, (nuint)offset) - lowVector, rangeVector)); 3708inRangeVector = TNegator.NegateIfNeeded(Vector256.LessThanOrEqual(Vector256.LoadUnsafe(ref searchSpace) - lowVector, rangeVector)); 3800else if (Vector256.IsHardwareAccelerated && length >= Vector256<T>.Count) 3802Vector256<T> targetVector = Vector256.Create(value); 3806count += BitOperations.PopCount(Vector256.Equals(Vector256.LoadUnsafe(ref current), targetVector).ExtractMostSignificantBits()); 3811uint 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)
17[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);
Test.Utilities (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);