1318 references to Vector512
System.Linq (6)
System\Linq\Max.cs (1)
21public static Vector512<T> Compare(Vector512<T> left, Vector512<T> right) => Vector512.Max(left, right);
System\Linq\MaxMin.cs (4)
75else if (!Vector512.IsHardwareAccelerated || !Vector512<T>.IsSupported || span.Length < Vector512<T>.Count) 104Vector512<T> best = Vector512.LoadUnsafe(ref current); 109best = TMinMax.Compare(best, Vector512.LoadUnsafe(ref current)); 112best = TMinMax.Compare(best, Vector512.LoadUnsafe(ref lastVectorStart));
System\Linq\Min.cs (1)
21public static Vector512<T> Compare(Vector512<T> left, Vector512<T> right) => Vector512.Min(left, right);
System.Numerics.Tensors (764)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (71)
72if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TTransformOperator.Vectorizable) 515Vector512<T> vresult = Vector512.Create(TAggregationOperator.IdentityValue); 519Vector512<T> beg = transform.Invoke(Vector512.LoadUnsafe(ref xRef)); 520Vector512<T> end = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count)); 580vector1 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0))); 581vector2 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1))); 582vector3 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2))); 583vector4 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3))); 592vector1 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4))); 593vector2 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5))); 594vector3 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6))); 595vector4 = transform.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7))); 619beg = Vector512.ConditionalSelect(CreateAlignmentMaskVector512<T>((int)misalignment), beg, Vector512.Create(TAggregationOperator.IdentityValue)); 636Vector512<T> vector = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7))); 643Vector512<T> vector = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6))); 650Vector512<T> vector = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5))); 657Vector512<T> vector = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4))); 664Vector512<T> vector = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3))); 671Vector512<T> vector = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2))); 678Vector512<T> vector = transform.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 1))); 686end = Vector512.ConditionalSelect(CreateRemainderMaskVector512<T>((int)trailing), end, Vector512.Create(TAggregationOperator.IdentityValue)); 1191if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TBinaryOperator.Vectorizable) 1686Vector512<T> vresult = Vector512.Create(TAggregationOperator.IdentityValue); 1690Vector512<T> beg = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef), 1691Vector512.LoadUnsafe(ref yRef)); 1692Vector512<T> end = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count), 1693Vector512.LoadUnsafe(ref yRef, remainder - (uint)Vector512<T>.Count)); 1759vector1 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 1760Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 0))); 1761vector2 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 1762Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 1))); 1763vector3 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 1764Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 2))); 1765vector4 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 1766Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 3))); 1775vector1 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 1776Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 4))); 1777vector2 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 1778Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 5))); 1779vector3 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 1780Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 6))); 1781vector4 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 1782Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 7))); 1808beg = Vector512.ConditionalSelect(CreateAlignmentMaskVector512<T>((int)misalignment), beg, Vector512.Create(TAggregationOperator.IdentityValue)); 1825Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7)), 1826Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 7))); 1833Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6)), 1834Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 6))); 1841Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5)), 1842Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 5))); 1849Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4)), 1850Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 4))); 1857Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3)), 1858Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 3))); 1865Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2)), 1866Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 2))); 1873Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 1)), 1874Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 1))); 1882end = Vector512.ConditionalSelect(CreateRemainderMaskVector512<T>((int)trailing), end, Vector512.Create(TAggregationOperator.IdentityValue)); 2467return Vector512.LoadUnsafe( 2474return Vector512.LoadUnsafe( 2481return Vector512.LoadUnsafe( 2488return Vector512.LoadUnsafe( 2575return Vector512.LoadUnsafe( 2582return Vector512.LoadUnsafe( 2589return Vector512.LoadUnsafe( 2596return Vector512.LoadUnsafe(
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (78)
85if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TBinaryOperator.Vectorizable) 644Vector512<T> beg = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef), 645Vector512.LoadUnsafe(ref yRef)); 646Vector512<T> end = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count), 647Vector512.LoadUnsafe(ref yRef, remainder - (uint)Vector512<T>.Count)); 701vector1 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 702Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 0))); 703vector2 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 704Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 1))); 705vector3 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 706Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 2))); 707vector4 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 708Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 3))); 717vector1 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 718Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 4))); 719vector2 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 720Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 5))); 721vector3 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 722Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 6))); 723vector4 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 724Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 7))); 747vector1 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 748Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 0))); 749vector2 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 750Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 1))); 751vector3 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 752Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 2))); 753vector4 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 754Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 3))); 763vector1 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 764Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 4))); 765vector2 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 766Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 5))); 767vector3 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 768Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 6))); 769vector4 = TBinaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 770Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 7))); 810Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 8)), 811Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 8))); 818Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7)), 819Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 7))); 826Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6)), 827Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 6))); 834Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5)), 835Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 5))); 842Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4)), 843Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 4))); 850Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3)), 851Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 3))); 858Vector512<T> vector = TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2)), 859Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 2))); 1417if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TTransformOperator.Vectorizable && TBinaryOperator.Vectorizable) 1968Vector512<T> yVec = Vector512.Create(y); 1970Vector512<T> beg = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef)), 1972Vector512<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count)), 2024vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0))), 2026vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1))), 2028vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2))), 2030vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3))), 2040vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4))), 2042vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5))), 2044vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6))), 2046vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7))), 2069vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0))), 2071vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1))), 2073vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2))), 2075vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3))), 2085vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4))), 2087vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5))), 2089vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6))), 2091vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7))), 2130Vector512<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 8))), 2138Vector512<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7))), 2146Vector512<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6))), 2154Vector512<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5))), 2162Vector512<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4))), 2170Vector512<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3))), 2178Vector512<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2))),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (37)
43public static bool ShouldEarlyExit(Vector512<T> result) => Vector512.AnyWhereAllBitsSet(result); 79typeof(T) == typeof(float) ? Vector512.EqualsAny(result.AsUInt32(), Vector512<uint>.Zero) : 80typeof(T) == typeof(double) ? Vector512.EqualsAny(result.AsUInt64(), Vector512<ulong>.Zero) : 81Vector512.EqualsAny(result, Vector512<T>.Zero); 101if (Vector512.IsHardwareAccelerated && TOperator.Vectorizable && Vector512<T>.IsSupported) 109if (TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i)))) 120TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(x.Length - Vector512<T>.Count))))) 235if (Vector512.IsHardwareAccelerated && TOperator.Vectorizable && Vector512<T>.IsSupported) 259Vector512<byte> v = TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i)).AsByte(); 343if (Vector512.IsHardwareAccelerated && TOperator.Vectorizable && Vector512<T>.IsSupported) 368Vector512.Narrow( 369TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i)).AsUInt16(), 370TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + Vector512<T>.Count))).AsUInt16()); 460if (Vector512.IsHardwareAccelerated && TOperator.Vectorizable && Vector512<T>.IsSupported) 485Vector512.Narrow( 486Vector512.Narrow( 487TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i)).AsUInt32(), 488TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + Vector512<T>.Count))).AsUInt32()), 489Vector512.Narrow( 490TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector512<T>.Count)))).AsUInt32(), 491TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector512<T>.Count)))).AsUInt32())); 587if (Vector512.IsHardwareAccelerated && TOperator.Vectorizable && Vector512<T>.IsSupported) 614Vector512.Narrow( 615Vector512.Narrow( 616Vector512.Narrow( 617TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i)).AsUInt64(), 618TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + Vector512<T>.Count))).AsUInt64()), 619Vector512.Narrow( 620TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector512<T>.Count)))).AsUInt64(), 621TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector512<T>.Count)))).AsUInt64())), 622Vector512.Narrow( 623Vector512.Narrow( 624TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (4 * Vector512<T>.Count)))).AsUInt64(), 625TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (5 * Vector512<T>.Count)))).AsUInt64()), 626Vector512.Narrow( 627TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (6 * Vector512<T>.Count)))).AsUInt64(), 628TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)(i + (7 * Vector512<T>.Count)))).AsUInt64())));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs (26)
51if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TStatefulUnaryOperator.Vectorizable) 547Vector512<T> beg = op.Invoke(Vector512.LoadUnsafe(ref xRef)); 548Vector512<T> end = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count)); 599vector1 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0))); 600vector2 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1))); 601vector3 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2))); 602vector4 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3))); 611vector1 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4))); 612vector2 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5))); 613vector3 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6))); 614vector4 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7))); 636vector1 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0))); 637vector2 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1))); 638vector3 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2))); 639vector4 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3))); 648vector1 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4))); 649vector2 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5))); 650vector3 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6))); 651vector4 = op.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7))); 689Vector512<T> vector = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 8))); 696Vector512<T> vector = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7))); 703Vector512<T> vector = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6))); 710Vector512<T> vector = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5))); 717Vector512<T> vector = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4))); 724Vector512<T> vector = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3))); 731Vector512<T> vector = op.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2)));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (156)
72if (TTernaryOperator.Vectorizable && Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported) 694Vector512<T> beg = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef), 695Vector512.LoadUnsafe(ref yRef), 696Vector512.LoadUnsafe(ref zRef)); 697Vector512<T> end = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count), 698Vector512.LoadUnsafe(ref yRef, remainder - (uint)Vector512<T>.Count), 699Vector512.LoadUnsafe(ref zRef, remainder - (uint)Vector512<T>.Count)); 756vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 757Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 0)), 758Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 0))); 759vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 760Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 1)), 761Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 1))); 762vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 763Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 2)), 764Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 2))); 765vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 766Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 3)), 767Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 3))); 776vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 777Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 4)), 778Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 4))); 779vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 780Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 5)), 781Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 5))); 782vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 783Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 6)), 784Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 6))); 785vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 786Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 7)), 787Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 7))); 811vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 812Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 0)), 813Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 0))); 814vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 815Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 1)), 816Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 1))); 817vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 818Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 2)), 819Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 2))); 820vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 821Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 3)), 822Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 3))); 831vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 832Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 4)), 833Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 4))); 834vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 835Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 5)), 836Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 5))); 837vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 838Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 6)), 839Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 6))); 840vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 841Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 7)), 842Vector512.Load(zPtr + (uint)(Vector512<T>.Count * 7))); 884Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 8)), 885Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 8)), 886Vector512.LoadUnsafe(ref zRef, remainder - (uint)(Vector512<T>.Count * 8))); 893Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7)), 894Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 7)), 895Vector512.LoadUnsafe(ref zRef, remainder - (uint)(Vector512<T>.Count * 7))); 902Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6)), 903Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 6)), 904Vector512.LoadUnsafe(ref zRef, remainder - (uint)(Vector512<T>.Count * 6))); 911Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5)), 912Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 5)), 913Vector512.LoadUnsafe(ref zRef, remainder - (uint)(Vector512<T>.Count * 5))); 920Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4)), 921Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 4)), 922Vector512.LoadUnsafe(ref zRef, remainder - (uint)(Vector512<T>.Count * 4))); 929Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3)), 930Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 3)), 931Vector512.LoadUnsafe(ref zRef, remainder - (uint)(Vector512<T>.Count * 3))); 938Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2)), 939Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 2)), 940Vector512.LoadUnsafe(ref zRef, remainder - (uint)(Vector512<T>.Count * 2))); 1547if (TTernaryOperator.Vectorizable && Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported) 2161Vector512<T> zVec = Vector512.Create(z); 2163Vector512<T> beg = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef), 2164Vector512.LoadUnsafe(ref yRef), 2166Vector512<T> end = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count), 2167Vector512.LoadUnsafe(ref yRef, remainder - (uint)Vector512<T>.Count), 2222vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 2223Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 0)), 2225vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 2226Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 1)), 2228vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 2229Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 2)), 2231vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 2232Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 3)), 2242vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 2243Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 4)), 2245vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 2246Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 5)), 2248vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 2249Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 6)), 2251vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 2252Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 7)), 2276vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 2277Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 0)), 2279vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 2280Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 1)), 2282vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 2283Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 2)), 2285vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 2286Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 3)), 2296vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 2297Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 4)), 2299vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 2300Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 5)), 2302vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 2303Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 6)), 2305vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 2306Vector512.Load(yPtr + (uint)(Vector512<T>.Count * 7)), 2347Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 8)), 2348Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 8)), 2356Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7)), 2357Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 7)), 2365Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6)), 2366Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 6)), 2374Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5)), 2375Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 5)), 2383Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4)), 2384Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 4)), 2392Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3)), 2393Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 3)), 2401Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2)), 2402Vector512.LoadUnsafe(ref yRef, remainder - (uint)(Vector512<T>.Count * 2)), 3033if (TTernaryOperator.Vectorizable && Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported) 3637Vector512<T> yVec = Vector512.Create(y); 3638Vector512<T> zVec = Vector512.Create(z); 3640Vector512<T> beg = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef), 3643Vector512<T> end = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<T>.Count), 3696vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 3699vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 3702vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 3705vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 3716vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 3719vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 3722vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 3725vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 3749vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 0)), 3752vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 1)), 3755vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 2)), 3758vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 3)), 3769vector1 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 4)), 3772vector2 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 5)), 3775vector3 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 6)), 3778vector4 = TTernaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<T>.Count * 7)), 3818Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 8)), 3827Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 7)), 3836Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 6)), 3845Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 5)), 3854Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 4)), 3863Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 3)), 3872Vector512<T> vector = TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<T>.Count * 2)),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (30)
71if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TUnaryOperator.Vectorizable) 79(Vector512<T> first, Vector512<T> second) = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref sourceRef, (uint)i)); 92(Vector512<T> first, Vector512<T> second) = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref sourceRef, (uint)i)); 206if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TOperator.Vectorizable) 214(Vector512<T> first, Vector512<T> second) = TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), Vector512.LoadUnsafe(ref yRef, (uint)i)); 225Vector512<T> mask = Vector512.Equals(CreateRemainderMaskVector512<T>(x.Length - i), Vector512<T>.Zero); 229Vector512<T> first = Vector512.ConditionalSelect(mask, 230Vector512.Create(TOperator.RemainderMaskValue), 231Vector512.LoadUnsafe(ref xRef, (uint)i)); 233Vector512<T> second = Vector512.ConditionalSelect(mask, 234Vector512.Create(TOperator.RemainderMaskValue), 235Vector512.LoadUnsafe(ref yRef, (uint)i)); 239Vector512.ConditionalSelect(mask, 240Vector512.LoadUnsafe(ref destination1Ref, (uint)i), 244Vector512.ConditionalSelect(mask, 245Vector512.LoadUnsafe(ref destination2Ref, (uint)i), 387if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && TOperator.Vectorizable) 392Vector512<T> yVec = Vector512.Create(y); 397(Vector512<T> first, Vector512<T> second) = TOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), yVec); 408Vector512<T> mask = Vector512.Equals(CreateRemainderMaskVector512<T>(x.Length - i), Vector512<T>.Zero); 412Vector512<T> first = Vector512.ConditionalSelect(mask, 413Vector512.Create(TOperator.RemainderMaskValue), 414Vector512.LoadUnsafe(ref xRef, (uint)i)); 416Vector512<T> second = Vector512.ConditionalSelect(mask, 417Vector512.Create(TOperator.RemainderMaskValue), 422Vector512.ConditionalSelect(mask, 423Vector512.LoadUnsafe(ref destination1Ref, (uint)i), 427Vector512.ConditionalSelect(mask, 428Vector512.LoadUnsafe(ref destination2Ref, (uint)i),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToFourOperator.cs (3)
44if (Vector512.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 55(Vector512<TOutput>, Vector512<TOutput>, Vector512<TOutput>, Vector512<TOutput>) results = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref sourceRef, (uint)i)); 70(Vector512<TOutput>, Vector512<TOutput>, Vector512<TOutput>, Vector512<TOutput>) results = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref sourceRef, (uint)i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs (3)
44if (Vector512.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 55(Vector512<TOutput> lower, Vector512<TOutput> upper) = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref sourceRef, (uint)i)); 68(Vector512<TOutput> lower, Vector512<TOutput> upper) = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref sourceRef, (uint)i));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs (26)
91if (Vector512.IsHardwareAccelerated && Vector512<TInput>.IsSupported && Vector512<TOutput>.IsSupported && TUnaryOperator.Vectorizable && sizeof(TInput) == sizeof(TOutput)) 587Vector512<TOutput> beg = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef)); 588Vector512<TOutput> end = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)Vector512<TInput>.Count)); 639vector1 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 0))); 640vector2 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 1))); 641vector3 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 2))); 642vector4 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 3))); 651vector1 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 4))); 652vector2 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 5))); 653vector3 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 6))); 654vector4 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 7))); 676vector1 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 0))); 677vector2 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 1))); 678vector3 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 2))); 679vector4 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 3))); 688vector1 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 4))); 689vector2 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 5))); 690vector3 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 6))); 691vector4 = TUnaryOperator.Invoke(Vector512.Load(xPtr + (uint)(Vector512<TInput>.Count * 7))); 729Vector512<TOutput> vector = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<TInput>.Count * 8))); 736Vector512<TOutput> vector = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<TInput>.Count * 7))); 743Vector512<TOutput> vector = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<TInput>.Count * 6))); 750Vector512<TOutput> vector = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<TInput>.Count * 5))); 757Vector512<TOutput> vector = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<TInput>.Count * 4))); 764Vector512<TOutput> vector = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<TInput>.Count * 3))); 771Vector512<TOutput> vector = TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, remainder - (uint)(Vector512<TInput>.Count * 2)));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs (5)
44if (Vector512.IsHardwareAccelerated && TUnaryOperator.Vectorizable) 56Vector512.LoadUnsafe(ref xRef, (uint)i), 57Vector512.LoadUnsafe(ref xRef, (uint)(i + Vector512<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i); 69Vector512.LoadUnsafe(ref xRef, (uint)i), 70Vector512.LoadUnsafe(ref xRef, (uint)(i + Vector512<TInput>.Count))).StoreUnsafe(ref destinationRef, (uint)i);
System\Numerics\Tensors\netcore\TensorPrimitives.Abs.cs (4)
103Vector512<T> abs = Vector512.ConditionalSelect(Vector512.LessThan(x, Vector512<T>.Zero), -x, x); 104if (Vector512.LessThan(abs, Vector512<T>.Zero) != Vector512<T>.Zero) 110return Vector512.Abs(x);
System\Numerics\Tensors\netcore\TensorPrimitives.AcosPi.cs (1)
36public static Vector512<T> Invoke(Vector512<T> x) => AcosOperator<T>.Invoke(x) / Vector512.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Add.cs (1)
74public static T Invoke(Vector512<T> x) => Vector512.Sum(x);
System\Numerics\Tensors\netcore\TensorPrimitives.AsinPi.cs (1)
36public static Vector512<T> Invoke(Vector512<T> x) => AsinOperator<T>.Invoke(x) / Vector512.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Atan2Pi.cs (1)
77public static Vector512<T> Invoke(Vector512<T> y, Vector512<T> x) => Atan2Operator<T>.Invoke(y, x) / Vector512.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.AtanPi.cs (1)
36public static Vector512<T> Invoke(Vector512<T> x) => AtanOperator<T>.Invoke(x) / Vector512.Create(T.Pi);
System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs (2)
63return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.AsSingle()) / Vector512.Create(3f)).As<float, T>(); 68return ExpOperator<double>.Invoke(LogOperator<double>.Invoke(x.AsDouble()) / Vector512.Create(3d)).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (2)
68return Vector512.Ceiling(x.AsSingle()).As<float, T>(); 73return Vector512.Ceiling(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Clamp.cs (3)
227public static Vector512<T> Invoke(Vector512<T> x, Vector512<T> min, Vector512<T> max) => Vector512.Clamp(x, min, max); 275public static Vector512<T> Invoke(Vector512<T> min, Vector512<T> max, Vector512<T> x) => Vector512.Clamp(x, min, max); 324public static Vector512<T> Invoke(Vector512<T> max, Vector512<T> x, Vector512<T> min) => Vector512.Clamp(x, min, max);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (46)
172public static Vector512<float> Invoke(Vector512<int> x) => Vector512.ConvertToSingle(x); 183public static Vector512<float> Invoke(Vector512<uint> x) => Vector512.ConvertToSingle(x); 194public static Vector512<double> Invoke(Vector512<ulong> x) => Vector512.ConvertToDouble(x); 205public static Vector512<double> Invoke(Vector512<long> x) => Vector512.ConvertToDouble(x); 216public static (Vector512<double> Lower, Vector512<double> Upper) Invoke(Vector512<float> x) => Vector512.Widen(x); 227public static Vector512<float> Invoke(Vector512<double> lower, Vector512<double> upper) => Vector512.Narrow(lower, upper); 238public static (Vector512<ushort> Lower, Vector512<ushort> Upper) Invoke(Vector512<byte> x) => Vector512.Widen(x); 269(Vector512<ushort> Lower, Vector512<ushort> Upper) ushorts = Vector512.Widen(x); 270(Vector512<uint> Lower, Vector512<uint> Upper) uintsLower = Vector512.Widen(ushorts.Lower); 271(Vector512<uint> Lower, Vector512<uint> Upper) uintsUpper = Vector512.Widen(ushorts.Upper); 312Vector512.ConvertToSingle(results.Item1), 313Vector512.ConvertToSingle(results.Item2), 314Vector512.ConvertToSingle(results.Item3), 315Vector512.ConvertToSingle(results.Item4) 328public static (Vector512<short> Lower, Vector512<short> Upper) Invoke(Vector512<sbyte> x) => Vector512.Widen(x); 339public static (Vector512<uint> Lower, Vector512<uint> Upper) Invoke(Vector512<ushort> x) => Vector512.Widen(x); 350public static (Vector512<int> Lower, Vector512<int> Upper) Invoke(Vector512<short> x) => Vector512.Widen(x); 361public static (Vector512<ulong> Lower, Vector512<ulong> Upper) Invoke(Vector512<uint> x) => Vector512.Widen(x); 372public static (Vector512<long> Lower, Vector512<long> Upper) Invoke(Vector512<int> x) => Vector512.Widen(x); 500(Vector512<int> lowerInt32, Vector512<int> upperInt32) = Vector512.Widen(x); 508Vector512<uint> sign = value & Vector512.Create(SingleSignMask); 514Vector512<uint> offsetExponent = bitValueInProcess & Vector512.Create(HalfExponentMask); 517Vector512<uint> subnormalMask = Vector512.Equals(offsetExponent, Vector512<uint>.Zero); 520Vector512<uint> infinityOrNaNMask = Vector512.Equals(offsetExponent, Vector512.Create(HalfExponentMask)); 523Vector512<uint> maskedExponentLowerBound = subnormalMask & Vector512.Create(ExponentLowerBound); 526Vector512<uint> offsetMaskedExponentLowerBound = Vector512.Create(ExponentOffset) | maskedExponentLowerBound; 529bitValueInProcess = Vector512.ShiftLeft(bitValueInProcess, 13); 532offsetMaskedExponentLowerBound = Vector512.ConditionalSelect(Vector512.Equals(infinityOrNaNMask, Vector512<uint>.Zero), 534Vector512.ShiftLeft(offsetMaskedExponentLowerBound, 1)); 537bitValueInProcess &= Vector512.Create(HalfToSingleBitsMask); 705return Vector512.Narrow( 714Vector512<uint> sign = Vector512.ShiftRightLogical(bitValue & Vector512.Create(SingleSignMask), 16); 717Vector512<uint> realMask = Vector512.Equals(value, value).AsUInt32(); 720value = Vector512.Abs(value); 723value = Vector512.Min(Vector512.Create(MaxHalfValueBelowInfinity), value); 726Vector512<uint> exponentOffset0 = Vector512.Max(value, Vector512.Create(MinExp).AsSingle()).AsUInt32(); 729exponentOffset0 &= Vector512.Create(SingleBiasedExponentMask); 732exponentOffset0 += Vector512.Create(Exponent13); 739Vector512<uint> maskedHalfExponentForNaN = ~realMask & Vector512.Create(ExponentMask); 742bitValue -= Vector512.Create(Exponent126); 745Vector512<uint> newExponent = Vector512.ShiftRightLogical(bitValue, 13);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (6)
80return Vector512.IsNegative(Vector512<TTo>.AllBitsSet) != Vector512<TTo>.Zero ? 81Vector512.ConvertToInt32(x.AsSingle()).As<int, TTo>() : 82Vector512.ConvertToUInt32(x.AsSingle()).As<uint, TTo>(); 87return Vector512.IsNegative(Vector512<TTo>.AllBitsSet) != Vector512<TTo>.Zero ? 88Vector512.ConvertToInt64(x.AsDouble()).As<long, TTo>() : 89Vector512.ConvertToUInt64(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (6)
79return Vector512.IsNegative(Vector512<TTo>.AllBitsSet) != Vector512<TTo>.Zero ? 80Vector512.ConvertToInt32Native(x.AsSingle()).As<int, TTo>() : 81Vector512.ConvertToUInt32Native(x.AsSingle()).As<uint, TTo>(); 86return Vector512.IsNegative(Vector512<TTo>.AllBitsSet) != Vector512<TTo>.Zero ? 87Vector512.ConvertToInt64Native(x.AsDouble()).As<long, TTo>() : 88Vector512.ConvertToUInt64Native(x.AsDouble()).As<ulong, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (10)
116public static Vector512<int> Invoke(Vector512<float> x) => Vector512.ConvertToInt32(x); 132public static Vector512<uint> Invoke(Vector512<float> x) => Vector512.ConvertToUInt32(x); 148public static Vector512<ulong> Invoke(Vector512<double> x) => Vector512.ConvertToUInt64(x); 164public static Vector512<long> Invoke(Vector512<double> x) => Vector512.ConvertToInt64(x); 175public static Vector512<byte> Invoke(Vector512<ushort> lower, Vector512<ushort> upper) => Vector512.Narrow(lower, upper); 186public static Vector512<sbyte> Invoke(Vector512<short> lower, Vector512<short> upper) => Vector512.Narrow(lower, upper); 197public static Vector512<ushort> Invoke(Vector512<uint> lower, Vector512<uint> upper) => Vector512.Narrow(lower, upper); 208public static Vector512<short> Invoke(Vector512<int> lower, Vector512<int> upper) => Vector512.Narrow(lower, upper); 219public static Vector512<uint> Invoke(Vector512<ulong> lower, Vector512<ulong> upper) => Vector512.Narrow(lower, upper); 230public static Vector512<int> Invoke(Vector512<long> lower, Vector512<long> upper) => Vector512.Narrow(lower, upper);
System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs (1)
129return Vector512.CopySign(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (2)
131return Vector512.Cos(x.AsDouble()).As<double, T>(); 136return Vector512.Cos(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (8)
128Vector512<float> y = Vector512.Abs(x); 129Vector512<float> z = ExpOperator<float>.Invoke(y - Vector512.Create((float)Single_LOGV)); 130return (Vector512.Create((float)Single_HALFV) * (z + (Vector512.Create((float)Single_INVV2) / z))).As<float, T>(); 137Vector512<double> y = Vector512.Abs(x); 138Vector512<double> z = ExpOperator<double>.Invoke(y - Vector512.Create(Double_LOGV)); 139return (Vector512.Create(Double_HALFV) * (z + (Vector512.Create(Double_INVV2) / z))).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (13)
61if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && x.Length >= Vector512<T>.Count) 76Vector512.LoadUnsafe(ref xRef, (uint)i), 77Vector512.LoadUnsafe(ref yRef, (uint)i), 90Vector512.LoadUnsafe(ref xRef, (uint)(x.Length - Vector512<T>.Count)) & remainderMask, 91Vector512.LoadUnsafe(ref yRef, (uint)(x.Length - Vector512<T>.Count)) & remainderMask, 201if (Vector512.IsHardwareAccelerated && x.Length >= Vector512<short>.Count) 216(Vector512<float> xVecLower, Vector512<float> xVecUpper) = WidenHalfAsInt16ToSingleOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i)); 217(Vector512<float> yVecLower, Vector512<float> yVecUpper) = WidenHalfAsInt16ToSingleOperator.Invoke(Vector512.LoadUnsafe(ref yRef, (uint)i)); 232Vector512.LoadUnsafe(ref xRef, (uint)(x.Length - Vector512<short>.Count)) & remainderMask); 234Vector512.LoadUnsafe(ref yRef, (uint)(x.Length - Vector512<short>.Count)) & remainderMask); 384Vector512.Sum(dotProductVector) / (T.Sqrt(Vector512.Sum(xSumOfSquaresVector)) * T.Sqrt(Vector512.Sum(ySumOfSquaresVector)));
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (7)
96Vector512<T> xpi = x * Vector512.Create(T.Pi); 100if (Vector512.GreaterThanAny(xpi.AsUInt32() & Vector512.Create(CosOperatorSingle.SignMask), Vector512.Create(CosOperatorSingle.MaxVectorizedValue))) 108if (Vector512.GreaterThanAny(xpi.AsUInt64() & Vector512.Create(CosOperatorDouble.SignMask), Vector512.Create(CosOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (2)
78return Vector512.DegreesToRadians(x.AsDouble()).As<double, T>(); 83return Vector512.DegreesToRadians(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (2)
104return Vector512.Exp(x.AsDouble()).As<double, T>(); 109return Vector512.Exp(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs (1)
46public static Vector512<T> Invoke(Vector512<T> x) => ExpOperator<T>.Invoke(x * Vector512.Create(T.CreateTruncating(NaturalLog10)));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs (1)
46public static Vector512<T> Invoke(Vector512<T> x) => ExpOperator<T>.Invoke(x * Vector512.Create(T.CreateTruncating(NaturalLog2)));
System\Numerics\Tensors\netcore\TensorPrimitives.FloatHelpers.cs (6)
17Vector512.Create(ApplyScalar<TOperator>(floats.GetLower()), ApplyScalar<TOperator>(floats.GetUpper())); 26Vector512.Create(ApplyScalar<TOperator>(doubles.GetLower()), ApplyScalar<TOperator>(doubles.GetUpper())); 61Vector512.Create(firstLower, firstUpper), 62Vector512.Create(secondLower, secondUpper) 97Vector512.Create(firstLower, firstUpper), 98Vector512.Create(secondLower, secondUpper)
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (2)
68return Vector512.Floor(x.AsSingle()).As<float, T>(); 73return Vector512.Floor(x.AsDouble()).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (2)
207return Vector512.FusedMultiplyAdd(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 212return Vector512.FusedMultiplyAdd(x.AsSingle(), y.AsSingle(), z.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (7)
79if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && x.Length >= Vector512<T>.Count) 88Vector512<T> xVec = Vector512.LoadUnsafe(ref xRef, (uint)i); 89Vector512<T> yVec = Vector512.LoadUnsafe(ref yRef, (uint)i); 91count += BitOperations.PopCount((~Vector512.Equals(xVec, yVec)).ExtractMostSignificantBits()); 100Vector512<T> xVec = Vector512.LoadUnsafe(ref xRef, (uint)(x.Length - Vector512<T>.Count)); 101Vector512<T> yVec = Vector512.LoadUnsafe(ref yRef, (uint)(x.Length - Vector512<T>.Count)); 107count += BitOperations.PopCount((~Vector512.Equals(xVec, yVec)).ExtractMostSignificantBits());
System\Numerics\Tensors\netcore\TensorPrimitives.Hypot.cs (2)
82return Vector512.Hypot(x.AsDouble(), y.AsDouble()).As<double, T>(); 87return Vector512.Hypot(x.AsSingle(), y.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (19)
89Vector512<T> useResult = Vector512.GreaterThan(result, current); 90Vector512<T> equalMask = Vector512.Equals(result, current); 99Vector512<T> sameSign = Vector512.Equals(IsNegative(result).AsInt32(), currentNegative.AsInt32()).As<int, T>(); 148if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && x.Length >= Vector512<T>.Count) 154sizeof(T) == sizeof(long) ? Vector512.Create((long)i).As<long, T>() : 155sizeof(T) == sizeof(int) ? Vector512.Create(i).As<int, T>() : 156sizeof(T) == sizeof(short) ? Vector512.Create((short)i).As<short, T>() : 157Vector512.Create((byte)i).As<byte, T>(); 177Vector512<T> result = Vector512.LoadUnsafe(ref xRef); 183nanMask = ~Vector512.Equals(result, result); 197current = Vector512.LoadUnsafe(ref xRef, (uint)i); 202nanMask = ~Vector512.Equals(current, current); 217current = Vector512.LoadUnsafe(ref xRef, (uint)(x.Length - Vector512<T>.Count)); 222nanMask = ~Vector512.Equals(current, current); 461sizeof(T) == sizeof(long) ? Vector512.LessThan(indices1.AsInt64(), indices2.AsInt64()).As<long, T>() : 462sizeof(T) == sizeof(int) ? Vector512.LessThan(indices1.AsInt32(), indices2.AsInt32()).As<int, T>() : 463sizeof(T) == sizeof(short) ? Vector512.LessThan(indices1.AsInt16(), indices2.AsInt16()).As<short, T>() : 464Vector512.LessThan(indices1.AsByte(), indices2.AsByte()).As<byte, T>(); 515return Vector512.ConditionalSelect(mask, left, right);
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMaxMagnitude.cs (5)
88Vector512<T> resultMag = Vector512.Abs(result), currentMag = Vector512.Abs(current); 89Vector512<T> useResult = Vector512.GreaterThan(resultMag, currentMag); 90Vector512<T> equalMask = Vector512.Equals(resultMag, currentMag); 99Vector512<T> sameSign = Vector512.Equals(IsNegative(result).AsInt32(), currentNegative.AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMin.cs (3)
86Vector512<T> useResult = Vector512.LessThan(result, current); 87Vector512<T> equalMask = Vector512.Equals(result, current); 96Vector512<T> sameSign = Vector512.Equals(resultNegative.AsInt32(), IsNegative(current).AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMinMagnitude.cs (5)
88Vector512<T> resultMag = Vector512.Abs(result), currentMag = Vector512.Abs(current); 89Vector512<T> useResult = Vector512.LessThan(resultMag, currentMag); 90Vector512<T> equalMask = Vector512.Equals(resultMag, currentMag); 99Vector512<T> sameSign = Vector512.Equals(resultNegative.AsInt32(), IsNegative(current).AsInt32()).As<int, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IsEvenInteger.cs (1)
59public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsEvenInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsFinite.cs (1)
77public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsFinite(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInfinity.cs (1)
64public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsInteger.cs (1)
74public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNegativeInfinity.cs (1)
64public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsNegativeInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsNormal.cs (1)
60public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsNormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsOddInteger.cs (1)
59public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsOddInteger(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPositiveInfinity.cs (1)
64public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsPositiveInfinity(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsPow2.cs (2)
66Vector512.Equals(x & (x - Vector512<T>.One), Vector512<T>.Zero) & 67Vector512.GreaterThan(x, Vector512<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.IsSubnormal.cs (1)
64public static Vector512<T> Invoke(Vector512<T> x) => Vector512.IsSubnormal(x);
System\Numerics\Tensors\netcore\TensorPrimitives.IsZero.cs (1)
55public static Vector512<T> Invoke(Vector512<T> x) => Vector512.Equals(x, Vector512<T>.Zero);
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (5)
145Vector512.Create((byte)8, 7, 6, 6, 5, 5, 5, 5, 153Vector512<byte> lookupVectorB = Vector512.Create((byte)1); 154Vector512<byte> bit7ZeroMask = Avx512BW.CompareLessThan(x.AsByte(), Vector512.Create((byte)128)); 162Vector512<uint> lowHalf = Vector512.Create((uint)0x0000FFFF); 182return Vector512.Create(Invoke(x.GetLower()), Invoke(x.GetUpper()));
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (2)
142return Vector512.Lerp(x.AsDouble(), y.AsDouble(), amount.AsDouble()).As<double, T>(); 147return Vector512.Lerp(x.AsSingle(), y.AsSingle(), amount.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (2)
160return Vector512.Log(x.AsDouble()).As<double, T>(); 165return Vector512.Log(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (1)
50public static Vector512<T> Invoke(Vector512<T> x) => LogOperator<T>.Invoke(x) / Vector512.Create(T.CreateTruncating(NaturalLog10));
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (2)
106return Vector512.Log2(x.AsDouble()).As<double, T>(); 111return Vector512.Log2(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (10)
158return Vector512.Max(x, y); 201return Vector512.IsNaN(vector); 276return Vector512.IsNegative(vector); 366return Vector512.IsPositive(vector); 409if (Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported && x.Length >= Vector512<T>.Count) 415Vector512<T> result = Vector512.LoadUnsafe(ref xRef, 0); 436current = Vector512.LoadUnsafe(ref xRef, (uint)i); 441nanMask = ~Vector512.Equals(current, current); 455current = Vector512.LoadUnsafe(ref xRef, (uint)(x.Length - Vector512<T>.Count)); 460nanMask = ~Vector512.Equals(current, current);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs (1)
142return Vector512.MaxMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitudeNumber.cs (1)
199return Vector512.MaxMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MaxNumber.cs (1)
149return Vector512.MaxNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs (1)
156return Vector512.Min(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs (1)
154return Vector512.MinMagnitude(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitudeNumber.cs (1)
197return Vector512.MinMagnitudeNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MinNumber.cs (1)
149return Vector512.MinNumber(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (2)
208return Vector512.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As<double, T>(); 212return Vector512.MultiplyAddEstimate(x.AsSingle(), y.AsSingle(), z.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (11)
188Vector512<byte> c1 = Vector512.Create((byte)0x55); 189Vector512<byte> c2 = Vector512.Create((byte)0x33); 190Vector512<byte> c3 = Vector512.Create((byte)0x0F); 204Vector512<ushort> c1 = Vector512.Create((ushort)0x5555); 205Vector512<ushort> c2 = Vector512.Create((ushort)0x3333); 206Vector512<ushort> c3 = Vector512.Create((ushort)0x0F0F); 207Vector512<ushort> c4 = Vector512.Create((ushort)0x0101); 218Vector512<uint> c1 = Vector512.Create(0x55555555u); 219Vector512<uint> c2 = Vector512.Create(0x33333333u); 220Vector512<uint> c3 = Vector512.Create(0x0F0F0F0Fu); 221Vector512<uint> c4 = Vector512.Create(0x01010101u);
System\Numerics\Tensors\netcore\TensorPrimitives.RadiansToDegrees.cs (2)
71return Vector512.RadiansToDegrees(x.AsDouble()).As<double, T>(); 76return Vector512.RadiansToDegrees(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (2)
115public static Vector512<T> Invoke(Vector512<T> x) => Vector512<T>.One / Vector512.Sqrt(x); 246return Vector512<T>.One / Vector512.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs (2)
65return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.AsSingle()) / Vector512.Create((float)_n)).As<float, T>(); 70return ExpOperator<double>.Invoke(LogOperator<double>.Invoke(x.AsDouble()) / Vector512.Create((double)_n)).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (8)
234return Vector512.Round(x.AsDouble()).As<double, T>(); 239return Vector512.Round(x.AsSingle()).As<float, T>(); 296return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector512.Create(0.49999997f), x.AsSingle())).As<float, T>(); 301return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector512.Create(0.49999999999999994), x.AsDouble())).As<double, T>(); 350Vector512<T> limit = Vector512.Create(typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit)); 351return Vector512.ConditionalSelect(Vector512.LessThan(Vector512.Abs(x), limit),
System\Numerics\Tensors\netcore\TensorPrimitives.ScaleB.cs (1)
36public Vector512<T> Invoke(Vector512<T> x) => x * Vector512.Create(_pow2n);
System\Numerics\Tensors\netcore\TensorPrimitives.Sigmoid.cs (2)
48public static Vector512<T> Invoke(Vector512<T> x) => Vector512.Create(T.One) / (Vector512.Create(T.One) + ExpOperator<T>.Invoke(-x));
System\Numerics\Tensors\netcore\TensorPrimitives.Sign.cs (8)
96return Vector512.ConditionalSelect(Vector512.Equals(x, Vector512<T>.Zero).AsInt32(), 107if (Vector512.EqualsAny(IsNaN(x).AsInt32(), Vector512<int>.AllBitsSet)) 112return Vector512.ConditionalSelect(Vector512.LessThan(x, Vector512<T>.Zero).AsInt32(), 113Vector512.Create(-1), 114Vector512.ConditionalSelect(Vector512.GreaterThan(x, Vector512<T>.Zero).AsInt32(),
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (2)
120return Vector512.Sin(x.AsDouble()).As<double, T>(); 125return Vector512.Sin(x.AsSingle()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (10)
118Vector512<float> y = Vector512.Abs(x); 119Vector512<float> z = ExpOperator<float>.Invoke(y - Vector512.Create((float)Single_LOGV)); 120Vector512<float> result = Vector512.Create((float)Single_HALFV) * (z - (Vector512.Create((float)Single_INVV2) / z)); 121Vector512<uint> sign = x.AsUInt32() & Vector512.Create(~(uint)int.MaxValue); 129Vector512<double> y = Vector512.Abs(x); 130Vector512<double> z = ExpOperator<double>.Invoke(y - Vector512.Create(Double_LOGV)); 131Vector512<double> result = Vector512.Create(Double_HALFV) * (z - (Vector512.Create(Double_INVV2) / z)); 132Vector512<ulong> sign = x.AsUInt64() & Vector512.Create(~(ulong)long.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (7)
96Vector512<T> xpi = x * Vector512.Create(T.Pi); 100if (Vector512.GreaterThanAny(xpi.AsUInt32() & Vector512.Create(SinOperatorSingle.SignMask), Vector512.Create(SinOperatorSingle.MaxVectorizedValue))) 108if (Vector512.GreaterThanAny(xpi.AsUInt64() & Vector512.Create(SinOperatorDouble.SignMask), Vector512.Create(SinOperatorDouble.MaxVectorizedValue)))
System\Numerics\Tensors\netcore\TensorPrimitives.Sqrt.cs (1)
39public static Vector512<T> Invoke(Vector512<T> x) => Vector512.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
63Vector512<T> diff = x - Vector512.Create(_subtrahend);
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (47)
200Vector512<float> uxMasked = Vector512.Abs(x); 201if (Vector512.GreaterThanAny(uxMasked.AsUInt32(), Vector512.Create(MaxVectorizedValue))) 206Vector512<float> dn = MultiplyAddEstimateOperator<float>.Invoke(uxMasked, Vector512.Create(2 / float.Pi), Vector512.Create(AlmHuge)); 208dn -= Vector512.Create(AlmHuge); 211f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector512.Create(-float.Pi / 2), f); 212f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector512.Create(Pi_Tail2), f); 213f = MultiplyAddEstimateOperator<float>.Invoke(dn, Vector512.Create(Pi_Tail3), f); 220Vector512<float> a1 = MultiplyAddEstimateOperator<float>.Invoke(Vector512.Create(C2), f2, Vector512.Create(C1)); 221Vector512<float> a2 = MultiplyAddEstimateOperator<float>.Invoke(Vector512.Create(C4), f2, Vector512.Create(C3)); 222Vector512<float> a3 = MultiplyAddEstimateOperator<float>.Invoke(Vector512.Create(C6), f2, Vector512.Create(C5)); 224Vector512<float> b2 = MultiplyAddEstimateOperator<float>.Invoke(f8, a3, f12 * Vector512.Create(C7)); 227Vector512<float> result = (poly.AsUInt32() ^ (x.AsUInt32() & Vector512.Create(~SignMask))).AsSingle(); 228return Vector512.ConditionalSelect(Vector512.Equals(odd, Vector512<uint>.Zero).AsSingle(), 230Vector512.Create(-1f) / result); 357Vector512<double> uxMasked = Vector512.Abs(x); 358if (Vector512.GreaterThanAny(uxMasked.AsUInt64(), Vector512.Create(MaxVectorizedValue))) 364Vector512<double> dn = MultiplyAddEstimateOperator<double>.Invoke(uxMasked, Vector512.Create(2 / double.Pi), Vector512.Create(AlmHuge)); 366dn -= Vector512.Create(AlmHuge); 370f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector512.Create(-double.Pi / 2), f); 371f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector512.Create(-HalfPi2), f); 372f = MultiplyAddEstimateOperator<double>.Invoke(dn, Vector512.Create(-HalfPi3), f); 383Vector512<double> a1 = MultiplyAddEstimateOperator<double>.Invoke(Vector512.Create(C3), g, Vector512.Create(C1)); 384Vector512<double> a2 = MultiplyAddEstimateOperator<double>.Invoke(Vector512.Create(C7), g, Vector512.Create(C5)); 385Vector512<double> a3 = MultiplyAddEstimateOperator<double>.Invoke(Vector512.Create(C11), g, Vector512.Create(C9)); 386Vector512<double> a4 = MultiplyAddEstimateOperator<double>.Invoke(Vector512.Create(C15), g, Vector512.Create(C13)); 387Vector512<double> a5 = MultiplyAddEstimateOperator<double>.Invoke(Vector512.Create(C19), g, Vector512.Create(C17)); 388Vector512<double> a6 = MultiplyAddEstimateOperator<double>.Invoke(Vector512.Create(C23), g, Vector512.Create(C21)); 389Vector512<double> a7 = MultiplyAddEstimateOperator<double>.Invoke(Vector512.Create(C27), g, Vector512.Create(C25)); 396Vector512<double> result = (poly.AsUInt64() ^ (x.AsUInt64() & Vector512.Create(~SignMask))).AsDouble(); 397return Vector512.ConditionalSelect(Vector512.Equals(odd, Vector512<ulong>.Zero).AsDouble(), 399Vector512.Create(-1.0) / result);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (8)
120Vector512<float> y = Vector512.Abs(x); 121Vector512<float> z = ExpM1Operator<float>.Invoke(Vector512.Create(-2f) * y); 122Vector512<uint> sign = x.AsUInt32() & Vector512.Create(~(uint)int.MaxValue); 123return (sign ^ (-z / (z + Vector512.Create(2f))).AsUInt32()).As<uint, T>(); 129Vector512<double> y = Vector512.Abs(x); 130Vector512<double> z = ExpM1Operator<double>.Invoke(Vector512.Create(-2d) * y); 131Vector512<ulong> sign = x.AsUInt64() & Vector512.Create(~(ulong)long.MaxValue); 132return (sign ^ (-z / (z + Vector512.Create(2d))).AsUInt64()).As<ulong, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
115return Vector512.Truncate(x.AsDouble()).As<double, T>(); 120return Vector512.Truncate(x.AsSingle()).As<float, T>();
System.Private.CoreLib (544)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (7)
53if (Vector512.IsHardwareAccelerated && Avx512Vbmi.IsSupported && (end >= src)) 664Vector512<sbyte> vbmiLookup0 = Vector512.Create(decoder.VbmiLookup0).AsSByte(); 665Vector512<sbyte> vbmiLookup1 = Vector512.Create(decoder.VbmiLookup1).AsSByte(); 666Vector512<byte> vbmiPackedLanesControl = Vector512.Create( 672Vector512<sbyte> mergeConstant0 = Vector512.Create(0x01400140).AsSByte(); 673Vector512<short> mergeConstant1 = Vector512.Create(0x00011000).AsInt16(); 1350str = Vector512.Load(src).AsSByte();
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (10)
44if (Vector512.IsHardwareAccelerated && Avx512Vbmi.IsSupported && (end >= src)) 152Vector512<sbyte> shuffleVecVbmi = Vector512.Create( 157Vector512<sbyte> vbmiLookup = Vector512.Create(encoder.EncodingMap).AsSByte(); 159Vector512<ushort> maskAC = Vector512.Create((uint)0x0fc0fc00).AsUInt16(); 160Vector512<uint> maskBB = Vector512.Create((uint)0x3f003f00); 161Vector512<ushort> shiftAC = Vector512.Create((uint)0x0006000a).AsUInt16(); 162Vector512<ushort> shiftBB = Vector512.Create((uint)0x00080004).AsUInt16(); 170Vector512<sbyte> str = Vector512.Load(src).AsSByte(); 190str = Vector512.ConditionalSelect(maskBB, temp3.AsUInt32(), temp2.AsUInt32()).AsSByte(); 204str = Vector512.Load(src).AsSByte();
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (2)
666Vector512<ushort> utf16VectorLower = Vector512.Load(src); 667Vector512<ushort> utf16VectorUpper = Vector512.Load(src + 32);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (1)
385(Vector512<ushort> utf16LowVector, Vector512<ushort> utf16HighVector) = Vector512.Widen(str);
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (8)
171if (Vector512.IsHardwareAccelerated) 175Vector512<byte> vector = Vector512.LoadUnsafe(ref value, i); 176Vector512<byte> isFalse = Vector512.Equals(vector, Vector512<byte>.Zero); 423if (Vector512.IsHardwareAccelerated) 745Vector512<byte> shuffleMask = Vector512.Create(lowerShuffleMask_CopyToBoolArray256, upperShuffleMask_CopyToBoolArray256); 746Vector512<byte> bitMask = Vector512.Create(0x80402010_08040201).AsByte(); 747Vector512<byte> ones = Vector512.Create((byte)1); 754Vector512<ulong> scalar = Vector512.Create(bits);
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (1)
166if (Vector512.IsHardwareAccelerated && length >= Vector512<ushort>.Count)
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (8)
402return Vector512.ConvertToDouble(value.AsVector512()).AsVector(); 425return Vector512.ConvertToDouble(value.AsVector512()).AsVector(); 533return Vector512.ConvertToSingle(value.AsVector512()).AsVector(); 700return Vector512.Count(vector.AsVector512(), value); 1357return Vector512.IndexOf(vector.AsVector512(), value); 1603return Vector512.LastIndexOf(vector.AsVector512(), value); 2654return Vector512.ShiftLeft(vector.AsVector512(), shiftCount.AsVector512()).AsVector(); 2680return Vector512.ShiftLeft(vector.AsVector512(), shiftCount.AsVector512()).AsVector();
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (5)
765if (Vector512.IsHardwareAccelerated) 1670if (Vector512.IsHardwareAccelerated) 1922if (Vector512.IsHardwareAccelerated) 3720if (Vector512.IsHardwareAccelerated) 3764if (Vector512.IsHardwareAccelerated)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512_1.cs (99)
30[StructLayout(LayoutKind.Sequential, Size = Vector512.Size)] 41get => Vector512.Create(Scalar<T>.AllBitsSet); 52return Vector512.Size / sizeof(T); 104get => Vector512.Create(Scalar<T>.One); 137return Vector512.Create( 152return Vector512.Create( 167return Vector512.Create( 182return Vector512.Create( 196return Vector512.Create( 224return Vector512.Create( 246return Vector512.Create( 261return Vector512.Create( 276return Vector512.Create( 298return Vector512.Create( 312return Vector512.Create( 327return Vector512.Create( 343return vector ^ Vector512.Create(-0.0f).As<float, T>(); 347return vector ^ Vector512.Create(-0.0).As<double, T>(); 374return Vector512.Create( 395if (Vector512.IsHardwareAccelerated) 399Vector512<T> result = Vector512.Equals(this, other) | ~(Vector512.Equals(this, this) | Vector512.Equals(other, other)); 461static int ISimdVector<Vector512<T>, T>.Alignment => Vector512.Alignment; 470get => Vector512.IsHardwareAccelerated; 475static Vector512<T> ISimdVector<Vector512<T>, T>.Abs(Vector512<T> vector) => Vector512.Abs(vector); 483static bool ISimdVector<Vector512<T>, T>.All(Vector512<T> vector, T value) => Vector512.All(vector, value); 487static bool ISimdVector<Vector512<T>, T>.AllWhereAllBitsSet(Vector512<T> vector) => Vector512.AllWhereAllBitsSet(vector); 491static Vector512<T> ISimdVector<Vector512<T>, T>.AndNot(Vector512<T> left, Vector512<T> right) => Vector512.AndNot(left, right); 495static bool ISimdVector<Vector512<T>, T>.Any(Vector512<T> vector, T value) => Vector512.Any(vector, value); 499static bool ISimdVector<Vector512<T>, T>.AnyWhereAllBitsSet(Vector512<T> vector) => Vector512.AnyWhereAllBitsSet(vector); 511static Vector512<T> ISimdVector<Vector512<T>, T>.Ceiling(Vector512<T> vector) => Vector512.Ceiling(vector); 515static Vector512<T> ISimdVector<Vector512<T>, T>.Clamp(Vector512<T> value, Vector512<T> min, Vector512<T> max) => Vector512.Clamp(value, min, max); 519static Vector512<T> ISimdVector<Vector512<T>, T>.ClampNative(Vector512<T> value, Vector512<T> min, Vector512<T> max) => Vector512.ClampNative(value, min, max); 523static Vector512<T> ISimdVector<Vector512<T>, T>.ConditionalSelect(Vector512<T> condition, Vector512<T> left, Vector512<T> right) => Vector512.ConditionalSelect(condition, left, right); 527static Vector512<T> ISimdVector<Vector512<T>, T>.CopySign(Vector512<T> value, Vector512<T> sign) => Vector512.CopySign(value, sign); 540static int ISimdVector<Vector512<T>, T>.Count(Vector512<T> vector, T value) => Vector512.Count(vector, value); 544static int ISimdVector<Vector512<T>, T>.CountWhereAllBitsSet(Vector512<T> vector) => Vector512.CountWhereAllBitsSet(vector); 548static Vector512<T> ISimdVector<Vector512<T>, T>.Create(T value) => Vector512.Create(value); 551static Vector512<T> ISimdVector<Vector512<T>, T>.Create(T[] values) => Vector512.Create(values); 554static Vector512<T> ISimdVector<Vector512<T>, T>.Create(T[] values, int index) => Vector512.Create(values, index); 557static Vector512<T> ISimdVector<Vector512<T>, T>.Create(ReadOnlySpan<T> values) => Vector512.Create(values); 561static Vector512<T> ISimdVector<Vector512<T>, T>.CreateScalar(T value) => Vector512.CreateScalar(value); 565static Vector512<T> ISimdVector<Vector512<T>, T>.CreateScalarUnsafe(T value) => Vector512.CreateScalarUnsafe(value); 577static T ISimdVector<Vector512<T>, T>.Dot(Vector512<T> left, Vector512<T> right) => Vector512.Dot(left, right); 581static Vector512<T> ISimdVector<Vector512<T>, T>.Equals(Vector512<T> left, Vector512<T> right) => Vector512.Equals(left, right); 589static bool ISimdVector<Vector512<T>, T>.EqualsAny(Vector512<T> left, Vector512<T> right) => Vector512.EqualsAny(left, right); 593static Vector512<T> ISimdVector<Vector512<T>, T>.Floor(Vector512<T> vector) => Vector512.Floor(vector); 601static Vector512<T> ISimdVector<Vector512<T>, T>.GreaterThan(Vector512<T> left, Vector512<T> right) => Vector512.GreaterThan(left, right); 605static bool ISimdVector<Vector512<T>, T>.GreaterThanAll(Vector512<T> left, Vector512<T> right) => Vector512.GreaterThanAll(left, right); 609static bool ISimdVector<Vector512<T>, T>.GreaterThanAny(Vector512<T> left, Vector512<T> right) => Vector512.GreaterThanAny(left, right); 613static Vector512<T> ISimdVector<Vector512<T>, T>.GreaterThanOrEqual(Vector512<T> left, Vector512<T> right) => Vector512.GreaterThanOrEqual(left, right); 617static bool ISimdVector<Vector512<T>, T>.GreaterThanOrEqualAll(Vector512<T> left, Vector512<T> right) => Vector512.GreaterThanOrEqualAll(left, right); 621static bool ISimdVector<Vector512<T>, T>.GreaterThanOrEqualAny(Vector512<T> left, Vector512<T> right) => Vector512.GreaterThanOrEqualAny(left, right); 625static int ISimdVector<Vector512<T>, T>.IndexOf(Vector512<T> vector, T value) => Vector512.IndexOf(vector, value); 629static int ISimdVector<Vector512<T>, T>.IndexOfWhereAllBitsSet(Vector512<T> vector) => Vector512.IndexOfWhereAllBitsSet(vector); 633static Vector512<T> ISimdVector<Vector512<T>, T>.IsEvenInteger(Vector512<T> vector) => Vector512.IsEvenInteger(vector); 637static Vector512<T> ISimdVector<Vector512<T>, T>.IsFinite(Vector512<T> vector) => Vector512.IsFinite(vector); 641static Vector512<T> ISimdVector<Vector512<T>, T>.IsInfinity(Vector512<T> vector) => Vector512.IsInfinity(vector); 645static Vector512<T> ISimdVector<Vector512<T>, T>.IsInteger(Vector512<T> vector) => Vector512.IsInteger(vector); 649static Vector512<T> ISimdVector<Vector512<T>, T>.IsNaN(Vector512<T> vector) => Vector512.IsNaN(vector); 653static Vector512<T> ISimdVector<Vector512<T>, T>.IsNegative(Vector512<T> vector) => Vector512.IsNegative(vector); 657static Vector512<T> ISimdVector<Vector512<T>, T>.IsNegativeInfinity(Vector512<T> vector) => Vector512.IsNegativeInfinity(vector); 661static Vector512<T> ISimdVector<Vector512<T>, T>.IsNormal(Vector512<T> vector) => Vector512.IsNormal(vector); 665static Vector512<T> ISimdVector<Vector512<T>, T>.IsOddInteger(Vector512<T> vector) => Vector512.IsOddInteger(vector); 669static Vector512<T> ISimdVector<Vector512<T>, T>.IsPositive(Vector512<T> vector) => Vector512.IsPositive(vector); 673static Vector512<T> ISimdVector<Vector512<T>, T>.IsPositiveInfinity(Vector512<T> vector) => Vector512.IsPositiveInfinity(vector); 677static Vector512<T> ISimdVector<Vector512<T>, T>.IsSubnormal(Vector512<T> vector) => Vector512.IsSubnormal(vector); 680static Vector512<T> ISimdVector<Vector512<T>, T>.IsZero(Vector512<T> vector) => Vector512.IsZero(vector); 684static int ISimdVector<Vector512<T>, T>.LastIndexOf(Vector512<T> vector, T value) => Vector512.LastIndexOf(vector, value); 688static int ISimdVector<Vector512<T>, T>.LastIndexOfWhereAllBitsSet(Vector512<T> vector) => Vector512.LastIndexOfWhereAllBitsSet(vector); 692static Vector512<T> ISimdVector<Vector512<T>, T>.LessThan(Vector512<T> left, Vector512<T> right) => Vector512.LessThan(left, right); 696static bool ISimdVector<Vector512<T>, T>.LessThanAll(Vector512<T> left, Vector512<T> right) => Vector512.LessThanAll(left, right); 700static bool ISimdVector<Vector512<T>, T>.LessThanAny(Vector512<T> left, Vector512<T> right) => Vector512.LessThanAny(left, right); 704static Vector512<T> ISimdVector<Vector512<T>, T>.LessThanOrEqual(Vector512<T> left, Vector512<T> right) => Vector512.LessThanOrEqual(left, right); 708static bool ISimdVector<Vector512<T>, T>.LessThanOrEqualAll(Vector512<T> left, Vector512<T> right) => Vector512.LessThanOrEqualAll(left, right); 712static bool ISimdVector<Vector512<T>, T>.LessThanOrEqualAny(Vector512<T> left, Vector512<T> right) => Vector512.LessThanOrEqualAny(left, right); 716static Vector512<T> ISimdVector<Vector512<T>, T>.Load(T* source) => Vector512.Load(source); 720static Vector512<T> ISimdVector<Vector512<T>, T>.LoadAligned(T* source) => Vector512.LoadAligned(source); 724static Vector512<T> ISimdVector<Vector512<T>, T>.LoadAlignedNonTemporal(T* source) => Vector512.LoadAlignedNonTemporal(source); 728static Vector512<T> ISimdVector<Vector512<T>, T>.LoadUnsafe(ref readonly T source) => Vector512.LoadUnsafe(in source); 732static Vector512<T> ISimdVector<Vector512<T>, T>.LoadUnsafe(ref readonly T source, nuint elementOffset) => Vector512.LoadUnsafe(in source, elementOffset); 736static Vector512<T> ISimdVector<Vector512<T>, T>.Max(Vector512<T> left, Vector512<T> right) => Vector512.Max(left, right); 740static Vector512<T> ISimdVector<Vector512<T>, T>.MaxMagnitude(Vector512<T> left, Vector512<T> right) => Vector512.MaxMagnitude(left, right); 744static Vector512<T> ISimdVector<Vector512<T>, T>.MaxMagnitudeNumber(Vector512<T> left, Vector512<T> right) => Vector512.MaxMagnitudeNumber(left, right); 748static Vector512<T> ISimdVector<Vector512<T>, T>.MaxNative(Vector512<T> left, Vector512<T> right) => Vector512.MaxNative(left, right); 752static Vector512<T> ISimdVector<Vector512<T>, T>.MaxNumber(Vector512<T> left, Vector512<T> right) => Vector512.MaxNumber(left, right); 756static Vector512<T> ISimdVector<Vector512<T>, T>.Min(Vector512<T> left, Vector512<T> right) => Vector512.Min(left, right); 760static Vector512<T> ISimdVector<Vector512<T>, T>.MinMagnitude(Vector512<T> left, Vector512<T> right) => Vector512.MinMagnitude(left, right); 764static Vector512<T> ISimdVector<Vector512<T>, T>.MinMagnitudeNumber(Vector512<T> left, Vector512<T> right) => Vector512.MinMagnitudeNumber(left, right); 768static Vector512<T> ISimdVector<Vector512<T>, T>.MinNative(Vector512<T> left, Vector512<T> right) => Vector512.MinNative(left, right); 772static Vector512<T> ISimdVector<Vector512<T>, T>.MinNumber(Vector512<T> left, Vector512<T> right) => Vector512.MinNumber(left, right); 784static Vector512<T> ISimdVector<Vector512<T>, T>.MultiplyAddEstimate(Vector512<T> left, Vector512<T> right, Vector512<T> addend) => Vector512.MultiplyAddEstimate(left, right, addend); 792static bool ISimdVector<Vector512<T>, T>.None(Vector512<T> vector, T value) => Vector512.None(vector, value); 796static bool ISimdVector<Vector512<T>, T>.NoneWhereAllBitsSet(Vector512<T> vector) => Vector512.NoneWhereAllBitsSet(vector); 804static Vector512<T> ISimdVector<Vector512<T>, T>.Round(Vector512<T> vector) => Vector512.Round(vector); 820static Vector512<T> ISimdVector<Vector512<T>, T>.Sqrt(Vector512<T> vector) => Vector512.Sqrt(vector); 848static T ISimdVector<Vector512<T>, T>.Sum(Vector512<T> vector) => Vector512.Sum(vector); 856static Vector512<T> ISimdVector<Vector512<T>, T>.Truncate(Vector512<T> vector) => Vector512.Truncate(vector);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (10)
2378result = (TVectorDouble)(object)Vector512.ConvertToDouble((Vector512<long>)(object)vector); 2413result = (TVectorSingle)(object)Vector512.ConvertToSingle((Vector512<int>)(object)vector); 2537result = (TVector)(object)Vector512.Create(value); 2571result = (TVector)(object)Vector512.Create(value); 2668result = (TVectorSingle)(object)Vector512.Narrow((Vector512<double>)(object)lower, (Vector512<double>)(object)upper); 2714result = (TVectorUInt32)(object)Vector512.ShiftLeft( 2763result = (TVectorUInt64)(object)Vector512.ShiftLeft( 2952result = (TVectorDouble)(object)Vector512.Create(lower, upper); 2993result = (TVectorDouble)(object)Vector512.WidenLower((Vector512<float>)(object)vector); 3033result = (TVectorDouble)(object)Vector512.WidenUpper((Vector512<float>)(object)vector);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (10)
116Vector512<ushort> source0 = Vector512.LoadUnsafe(ref searchSpace0); 117Vector512<ushort> source1 = Vector512.LoadUnsafe(ref searchSpace1); 119Vector512<byte> sourceLower = Avx512Vbmi.PermuteVar64x8x2(source0.AsByte(), Vector512.CreateSequence<byte>(0, 2), source1.AsByte()); 120Vector512<byte> sourceUpper = Avx512Vbmi.PermuteVar64x8x2(source0.AsByte(), Vector512.CreateSequence<byte>(1, 2), source1.AsByte()); 138Vector512<byte> bitPositions = Avx512Vbmi.PermuteVar64x8(Vector512.Create(0x8040201008040201).AsByte(), shifted); 144return Vector512.Equals(bitMask & bitPositions, Vector512<byte>.Zero); 397return Vector512.IsHardwareAccelerated && Avx512Vbmi.VL.IsSupported 411return Vector512.IsHardwareAccelerated && Avx512Vbmi.VL.IsSupported 432Vector512<byte> charMap512 = Vector512.Create(charMap256); 607Vector512<byte> charMap512 = Vector512.Create(charMap256);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (3)
157if (Vector512.IsHardwareAccelerated && Avx512Vbmi.IsSupported && span.Length >= CharsPerIterationAvx512 + MatchStartOffsetN2) 177if (Vector512.IsHardwareAccelerated && Avx512Vbmi.IsSupported && span.Length >= CharsPerIterationAvx512 + MatchStartOffsetN3) 632ulong resultMask = (~Vector512.Equals(result, Vector512<byte>.Zero)).ExtractMostSignificantBits();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (5)
297public static Vector512<byte> TransformInput(Vector512<byte> input) => input & Vector512.Create(unchecked((byte)~0x20)); 365Vector512<byte> subtraction = Vector512.Create((byte)(128 + 'a')); 366Vector512<byte> comparison = Vector512.Create((byte)(128 + 26)); 367Vector512<byte> caseConversion = Vector512.Create((byte)0x20); 369Vector512<byte> matches = Vector512.LessThan((input - subtraction).AsSByte(), comparison.AsSByte()).AsByte();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyBucketizer.cs (4)
38return (Vector512.Create(low), Vector512.Create(high)); 72return (Vector512.Create(low), Vector512.Create(high));
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (4)
256Vector512<ushort> source0 = Vector512.LoadUnsafe(ref source); 257Vector512<ushort> source1 = Vector512.LoadUnsafe(ref source, (nuint)Vector512<ushort>.Count); 426return Avx512Vbmi.PermuteVar64x8x2(left, Vector512.CreateSequence<byte>(63, 1), right); 439return Avx512Vbmi.PermuteVar64x8x2(left, Vector512.CreateSequence<byte>(62, 1), right);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (17)
91if (Vector512.IsHardwareAccelerated && searchSpaceMinusValueTailLength - Vector512<ushort>.Count >= 0) 93Vector512<ushort> ch1 = Vector512.Create(_ch1); 94Vector512<ushort> ch2 = Vector512.Create(_ch2); 95Vector512<ushort> ch3 = Vector512.Create(_ch3); 310Vector512<ushort> cmpCh1 = Vector512.Equals(ch1, Vector512.LoadUnsafe(ref searchSpace)); 311Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 312Vector512<ushort> cmpCh3 = Vector512.Equals(ch3, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 317Vector512<ushort> caseConversion = Vector512.Create(CaseConversionMask); 319Vector512<ushort> cmpCh1 = Vector512.Equals(ch1, Vector512.LoadUnsafe(ref searchSpace) & caseConversion); 320Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 321Vector512<ushort> cmpCh3 = Vector512.Equals(ch3, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (36)
66if (Vector512.IsHardwareAccelerated && searchSpaceMinusValueTailLength - Vector512<byte>.Count >= 0) 75Vector512<byte> ch1 = Vector512.Create(value); 76Vector512<byte> ch2 = Vector512.Create(ch2Val); 87Vector512<byte> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 88Vector512<byte> cmpCh1 = Vector512.Equals(ch1, Vector512.LoadUnsafe(ref searchSpace, (nuint)offset)); 299if (Vector512.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector512<byte>.Count) 310Vector512<byte> ch1 = Vector512.Create(value); 311Vector512<byte> ch2 = Vector512.Create(ch2Val); 314Vector512<byte> cmpCh1 = Vector512.Equals(ch1, Vector512.LoadUnsafe(ref searchSpace, (nuint)offset)); 315Vector512<byte> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 520if (Vector512.IsHardwareAccelerated) 572Vector512<byte> search = Vector512.Load(searchSpace + offset); 573ulong matches = Vector512.Equals(Vector512<byte>.Zero, search).ExtractMostSignificantBits(); 823if (Vector512.IsHardwareAccelerated && length >= (nuint)Vector512<byte>.Count) 833if (Vector512.LoadUnsafe(ref first, offset) != 834Vector512.LoadUnsafe(ref second, offset)) 843if (Vector512.LoadUnsafe(ref first, lengthToExamine) == 844Vector512.LoadUnsafe(ref second, lengthToExamine)) 978if (Vector512.IsHardwareAccelerated && (lengthToExamine >= (nuint)Vector512<byte>.Count)) 984matches = Vector512.Equals(Vector512.LoadUnsafe(ref first, offset), Vector512.LoadUnsafe(ref second, offset)).ExtractMostSignificantBits(); 1001matches = Vector512.Equals(Vector512.LoadUnsafe(ref first, offset), Vector512.LoadUnsafe(ref second, offset)).ExtractMostSignificantBits(); 1306if (Vector512.IsHardwareAccelerated && remainder >= Vector512<byte>.Count * 2) 1312Vector512<byte> tempFirst = Vector512.LoadUnsafe(ref buf, (nuint)offset); 1313Vector512<byte> tempLast = Vector512.LoadUnsafe(ref buf, (nuint)lastOffset); 1323tempFirst = Vector512.Shuffle(tempFirst, Vector512.Create( 1328tempLast = Vector512.Shuffle(tempLast, Vector512.Create(
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (24)
71if (Vector512.IsHardwareAccelerated && searchSpaceMinusValueTailLength - Vector512<ushort>.Count >= 0) 80Vector512<ushort> ch1 = Vector512.Create((ushort)valueHead); 81Vector512<ushort> ch2 = Vector512.Create(ch2Val); 91Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 92Vector512<ushort> cmpCh1 = Vector512.Equals(ch1, Vector512.LoadUnsafe(ref searchSpace, (nuint)offset)); 313if (Vector512.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector512<ushort>.Count) 324Vector512<ushort> ch1 = Vector512.Create((ushort)valueHead); 325Vector512<ushort> ch2 = Vector512.Create((ushort)ch2Val); 330Vector512<ushort> cmpCh1 = Vector512.Equals(ch1, Vector512.LoadUnsafe(ref searchSpace, (nuint)offset)); 331Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset + ch1ch2Distance))); 581if (Vector512.IsHardwareAccelerated) 654if (!Vector512.EqualsAny(search, Vector512<ushort>.Zero)) 667ulong matches = Vector512.Equals(search, Vector512<ushort>.Zero).ExtractMostSignificantBits(); 894if (Vector512.IsHardwareAccelerated && remainder >= Vector512<ushort>.Count * 2) 902Vector512<ushort> tempFirst = Vector512.LoadUnsafe(ref first); 903Vector512<ushort> tempLast = Vector512.LoadUnsafe(ref last); 913tempFirst = Vector512.Shuffle(tempFirst, Vector512.Create((ushort)31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 915tempLast = Vector512.Shuffle(tempLast, Vector512.Create((ushort)31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16,
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (14)
95if (Vector512.IsHardwareAccelerated && remainder >= Vector512<int>.Count * 2) 101Vector512<int> tempFirst = Vector512.LoadUnsafe(ref buf, (nuint)offset); 102Vector512<int> tempLast = Vector512.LoadUnsafe(ref buf, (nuint)lastOffset); 112tempFirst = Vector512.Shuffle(tempFirst, Vector512.Create(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)); 113tempLast = Vector512.Shuffle(tempLast, Vector512.Create(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)); 200if (Vector512.IsHardwareAccelerated && remainder >= Vector512<long>.Count * 2) 206Vector512<long> tempFirst = Vector512.LoadUnsafe(ref buf, (nuint)offset); 207Vector512<long> tempLast = Vector512.LoadUnsafe(ref buf, (nuint)lastOffset); 217tempFirst = Vector512.Shuffle(tempFirst, Vector512.Create(7, 6, 5, 4, 3, 2, 1, 0)); 218tempLast = Vector512.Shuffle(tempLast, Vector512.Create(7, 6, 5, 4, 3, 2, 1, 0));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (56)
149if (Avx512BW.IsSupported && Vector512.IsHardwareAccelerated && length > Vector512<short>.Count) 152Vector512<byte> packedValue = Vector512.Create((byte)value); 164Vector512<short> source0 = Vector512.LoadUnsafe(ref currentSearchSpace); 165Vector512<short> source1 = Vector512.LoadUnsafe(ref currentSearchSpace, (nuint)Vector512<short>.Count); 168if (Vector512.EqualsAny(packedValue, packedSource)) 187Vector512<short> source0 = Vector512.LoadUnsafe(ref firstVector); 188Vector512<short> source1 = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 191if (Vector512.EqualsAny(packedValue, packedSource)) 348if (Avx512BW.IsSupported && Vector512.IsHardwareAccelerated && length > Vector512<short>.Count) 351Vector512<byte> packedValue = Vector512.Create((byte)value); 363Vector512<short> source0 = Vector512.LoadUnsafe(ref currentSearchSpace); 364Vector512<short> source1 = Vector512.LoadUnsafe(ref currentSearchSpace, (nuint)Vector512<short>.Count); 386Vector512<short> source0 = Vector512.LoadUnsafe(ref firstVector); 387Vector512<short> source1 = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 557if (Avx512BW.IsSupported && Vector512.IsHardwareAccelerated && length > Vector512<short>.Count) 560Vector512<byte> packedValue0 = Vector512.Create((byte)value0); 561Vector512<byte> packedValue1 = Vector512.Create((byte)value1); 573Vector512<short> source0 = Vector512.LoadUnsafe(ref currentSearchSpace); 574Vector512<short> source1 = Vector512.LoadUnsafe(ref currentSearchSpace, (nuint)Vector512<short>.Count); 576Vector512<byte> result = NegateIfNeeded<TNegator>(Vector512.Equals(packedValue0, packedSource) | Vector512.Equals(packedValue1, packedSource)); 597Vector512<short> source0 = Vector512.LoadUnsafe(ref firstVector); 598Vector512<short> source1 = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 600Vector512<byte> result = NegateIfNeeded<TNegator>(Vector512.Equals(packedValue0, packedSource) | Vector512.Equals(packedValue1, packedSource)); 772if (Avx512BW.IsSupported && Vector512.IsHardwareAccelerated && length > Vector512<short>.Count) 775Vector512<byte> packedValue0 = Vector512.Create((byte)value0); 776Vector512<byte> packedValue1 = Vector512.Create((byte)value1); 777Vector512<byte> packedValue2 = Vector512.Create((byte)value2); 789Vector512<short> source0 = Vector512.LoadUnsafe(ref currentSearchSpace); 790Vector512<short> source1 = Vector512.LoadUnsafe(ref currentSearchSpace, (nuint)Vector512<short>.Count); 792Vector512<byte> result = NegateIfNeeded<TNegator>(Vector512.Equals(packedValue0, packedSource) | Vector512.Equals(packedValue1, packedSource) | Vector512.Equals(packedValue2, packedSource)); 813Vector512<short> source0 = Vector512.LoadUnsafe(ref firstVector); 814Vector512<short> source1 = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 816Vector512<byte> result = NegateIfNeeded<TNegator>(Vector512.Equals(packedValue0, packedSource) | Vector512.Equals(packedValue1, packedSource) | Vector512.Equals(packedValue2, packedSource)); 972if (Avx512BW.IsSupported && Vector512.IsHardwareAccelerated && length > Vector512<short>.Count) 975Vector512<byte> lowVector = Vector512.Create((byte)lowInclusive); 976Vector512<byte> rangeVector = Vector512.Create((byte)rangeInclusive); 988Vector512<short> source0 = Vector512.LoadUnsafe(ref currentSearchSpace); 989Vector512<short> source1 = Vector512.LoadUnsafe(ref currentSearchSpace, (nuint)Vector512<short>.Count); 1011Vector512<short> source0 = Vector512.LoadUnsafe(ref firstVector); 1012Vector512<short> source1 = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 1202? Vector512.EqualsAny(left, right) : !Vector512.EqualsAll(left, right); 1210? Vector512.Equals(left, right) : ~Vector512.Equals(left, right); 1218? Vector512.LessThanOrEqualAny(left, right) : !Vector512.LessThanOrEqualAll(left, right); 1226? Vector512.LessThanOrEqual(left, right) : ~Vector512.LessThanOrEqual(left, right); 1318return Avx512F.PermuteVar8x64(result.AsInt64(), Vector512.Create(0, 2, 4, 6, 1, 3, 5, 7)).AsByte(); 1342public static Vector512<byte> TransformInput(Vector512<byte> input) => input | Vector512.Create((byte)0x20);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (151)
68vector = Vector512.Create(Unsafe.BitCast<T, Vector128<byte>>(value)).AsVector(); 80vector = Vector512.Create(Unsafe.BitCast<T, Vector256<byte>>(value)).AsVector(); 1368else if (Vector512.IsHardwareAccelerated && length >= Vector512<T>.Count) 1370Vector512<T> current, values = Vector512.Create(value); 1377current = Vector512.LoadUnsafe(ref currentSearchSpace); 1379if (Vector512.EqualsAny(values, current)) 1391current = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 1393if (Vector512.EqualsAny(values, current)) 1559else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 1561Vector512<TValue> current, values = Vector512.Create(value); 1568current = Vector512.LoadUnsafe(ref currentSearchSpace); 1582current = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 1784else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 1786Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1); 1793current = Vector512.LoadUnsafe(ref currentSearchSpace); 1794equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current)); 1808current = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 1809equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current)); 1991else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 1993Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1), values2 = Vector512.Create(value2); 2000current = Vector512.LoadUnsafe(ref currentSearchSpace); 2001equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current) | Vector512.Equals(values2, current)); 2015current = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 2016equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current) | Vector512.Equals(values2, current)); 2147else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 2149Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1), values2 = Vector512.Create(value2), values3 = Vector512.Create(value3); 2156current = Vector512.LoadUnsafe(ref currentSearchSpace); 2157equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current) 2158| Vector512.Equals(values2, current) | Vector512.Equals(values3, current)); 2172current = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 2173equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current) 2174| Vector512.Equals(values2, current) | Vector512.Equals(values3, current)); 2310else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 2312Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1), 2313values2 = Vector512.Create(value2), values3 = Vector512.Create(value3), values4 = Vector512.Create(value4); 2320current = Vector512.LoadUnsafe(ref currentSearchSpace); 2321equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current) | Vector512.Equals(values2, current) 2322| Vector512.Equals(values3, current) | Vector512.Equals(values4, current)); 2336current = Vector512.LoadUnsafe(ref oneVectorAwayFromEnd); 2337equals = TNegator.NegateIfNeeded(Vector512.Equals(values0, current) | Vector512.Equals(values1, current) | Vector512.Equals(values2, current) 2338| Vector512.Equals(values3, current) | Vector512.Equals(values4, current)); 2492else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 2631else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 2633Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1); 2639current = Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2640equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1)); 2653current = Vector512.LoadUnsafe(ref searchSpace); 2654equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1)); 2816else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 2818Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1), values2 = Vector512.Create(value2); 2824current = Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2825equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1) | Vector512.Equals(current, values2)); 2838current = Vector512.LoadUnsafe(ref searchSpace); 2839equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1) | Vector512.Equals(current, values2)); 2966else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 2968Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1), values2 = Vector512.Create(value2), values3 = Vector512.Create(value3); 2974current = Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset)); 2975equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1) 2976| Vector512.Equals(current, values2) | Vector512.Equals(current, values3)); 2988current = Vector512.LoadUnsafe(ref searchSpace); 2989equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1) | Vector512.Equals(current, values2) | Vector512.Equals(current, values3)); 3126else if (!Vector512.IsHardwareAccelerated || length < (uint)Vector512<T>.Count) 3151Debug.Assert(Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported, "Vector512 is not HW-accelerated or not supported"); 3154Vector512<T> oldValues = Vector512.Create(oldValue); 3155Vector512<T> newValues = Vector512.Create(newValue); 3160original = Vector512.LoadUnsafe(ref src, idx); 3161mask = Vector512.Equals(oldValues, original); 3162result = Vector512.ConditionalSelect(mask, newValues, original); 3169original = Vector512.LoadUnsafe(ref src, lastVectorIndex); 3170mask = Vector512.Equals(oldValues, original); 3171result = Vector512.ConditionalSelect(mask, newValues, original); 3224else if (Vector512.IsHardwareAccelerated && length >= Vector512<TValue>.Count) 3226Vector512<TValue> equals, current, values0 = Vector512.Create(value0), values1 = Vector512.Create(value1), 3227values2 = Vector512.Create(value2), values3 = Vector512.Create(value3), values4 = Vector512.Create(value4); 3233current = Vector512.LoadUnsafe(ref searchSpace, (nuint)(offset)); 3234equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1) | Vector512.Equals(current, values2) 3235| Vector512.Equals(current, values3) | Vector512.Equals(current, values4)); 3247current = Vector512.LoadUnsafe(ref searchSpace); 3248equals = TNegator.NegateIfNeeded(Vector512.Equals(current, values0) | Vector512.Equals(current, values1) | Vector512.Equals(current, values2) 3249| Vector512.Equals(current, values3) | Vector512.Equals(current, values4)); 3542else if (!Vector512.IsHardwareAccelerated || length < (uint)Vector512<T>.Count) 3573Vector512<T> lowVector = Vector512.Create(lowInclusive); 3574Vector512<T> rangeVector = Vector512.Create(highInclusive - lowInclusive); 3583inRangeVector = TNegator.NegateIfNeeded(Vector512.LessThanOrEqual(Vector512.LoadUnsafe(ref current) - lowVector, rangeVector)); 3594inRangeVector = TNegator.NegateIfNeeded(Vector512.LessThanOrEqual(Vector512.LoadUnsafe(ref oneVectorAwayFromEnd) - lowVector, rangeVector)); 3687else if (!Vector512.IsHardwareAccelerated || length < Vector512<T>.Count) 3716Vector512<T> lowVector = Vector512.Create(lowInclusive); 3717Vector512<T> rangeVector = Vector512.Create(highInclusive - lowInclusive); 3725inRangeVector = TNegator.NegateIfNeeded(Vector512.LessThanOrEqual(Vector512.LoadUnsafe(ref searchSpace, (nuint)offset) - lowVector, rangeVector)); 3735inRangeVector = TNegator.NegateIfNeeded(Vector512.LessThanOrEqual(Vector512.LoadUnsafe(ref searchSpace) - lowVector, rangeVector)); 3785if (Vector512.IsHardwareAccelerated && length >= Vector512<T>.Count) 3787Vector512<T> targetVector = Vector512.Create(value); 3791count += BitOperations.PopCount(Vector512.Equals(Vector512.LoadUnsafe(ref current), targetVector).ExtractMostSignificantBits()); 3796ulong mask = Vector512.Equals(Vector512.LoadUnsafe(ref oneVectorAwayFromEnd), targetVector).ExtractMostSignificantBits();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (9)
1300if (Vector512.IsHardwareAccelerated && length >= (uint)Vector512<ushort>.Count) 2043if (Vector512.IsHardwareAccelerated && lengthToExamine >= (uint)Vector512<ushort>.Count*2) 2045Vector512<ushort> v1 = Vector512.Create((ushort)c); 2046Vector512<ushort> v2 = Vector512.Create((ushort)c2); 2047Vector512<ushort> v3 = Vector512.Create((ushort)c3); 2051Vector512<ushort> vector = Vector512.LoadUnsafe(ref source, offset); 2052Vector512<ushort> v1Eq = Vector512.Equals(vector, v1); 2053Vector512<ushort> v2Eq = Vector512.Equals(vector, v2); 2054Vector512<ushort> v3Eq = Vector512.Equals(vector, v3);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (19)
65else if (Vector512.IsHardwareAccelerated && length >= (uint)Vector512<TLeft>.Count) 235else if (Vector512.IsHardwareAccelerated && length >= (uint)Vector512<TRight>.Count) 245Vector512<TRight> loweringMask = Vector512.Create(TRight.CreateTruncating(0x20)); 246Vector512<TRight> vecA = Vector512.Create(TRight.CreateTruncating('a')); 247Vector512<TRight> vecZMinusA = Vector512.Create(TRight.CreateTruncating(('z' - 'a'))); 253rightValues = Vector512.LoadUnsafe(ref currentRightSearchSpace); 259Vector512<TRight> notEquals = ~Vector512.Equals(leftValues, rightValues); 268if (Vector512.GreaterThanAny((leftValues - vecA) & notEquals, vecZMinusA) || leftValues != rightValues) 283rightValues = Vector512.LoadUnsafe(ref oneVectorAwayFromRightEnd); 290Vector512<TRight> notEquals = ~Vector512.Equals(leftValues, rightValues); 299if (Vector512.GreaterThanAny((leftValues - vecA) & notEquals, vecZMinusA) || leftValues != rightValues) 476public static Vector512<T> Load512(ref T ptr) => Vector512.LoadUnsafe(ref ptr); 496Vector512<T> leftValues = Vector512.LoadUnsafe(ref left); 497Vector512<T> rightValues = Vector512.LoadUnsafe(ref right); 548return Vector512.WidenLower(Vector256.LoadUnsafe(ref ptr).ToVector512()); 583Vector512<byte> leftNotWidened = Vector512.LoadUnsafe(ref utf8); 589(Vector512<ushort> leftLower, Vector512<ushort> leftUpper) = Vector512.Widen(leftNotWidened); 590Vector512<ushort> right = Vector512.LoadUnsafe(ref utf16); 591Vector512<ushort> rightNext = Vector512.LoadUnsafe(ref utf16, (uint)Vector512<ushort>.Count);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (41)
115if (!Vector512.IsHardwareAccelerated && 143if (Vector512.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector512<byte>.Count) 145if (Vector512.Load(pBuffer).ExtractMostSignificantBits() == 0) 151byte* pFinalVectorReadPos = pBuffer + bufferLength - Vector512.Size; 152pBuffer = (byte*)(((nuint)pBuffer + Vector512.Size) & ~(nuint)(Vector512.Size - 1)); 156Debug.Assert(0 < numBytesRead && numBytesRead <= Vector512.Size, "We should've made forward progress of at least one byte."); 164Debug.Assert((nuint)pBuffer % Vector512.Size == 0, "Vector read should be aligned."); 165if (Vector512.LoadAligned(pBuffer).ExtractMostSignificantBits() != 0) 170pBuffer += Vector512.Size; 735if (!Vector512.IsHardwareAccelerated && 763if (Vector512.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector512<ushort>.Count) 765const uint SizeOfVector512InChars = Vector512.Size / sizeof(ushort); 767if (!VectorContainsNonAsciiChar(Vector512.Load((ushort*)pBuffer))) 774pBuffer = (char*)(((nuint)pBuffer + Vector512.Size) & ~(nuint)(Vector512.Size - 1)); 786Debug.Assert((nuint)pBuffer % Vector512.Size == 0, "Vector read should be aligned."); 787if (VectorContainsNonAsciiChar(Vector512.LoadAligned((ushort*)pBuffer))) 1373if (Vector512.IsHardwareAccelerated && elementCount >= 2 * (uint)Vector512<byte>.Count) 1592Vector512<ushort> zeroIsAscii = utf16Vector & Vector512.Create(asciiMask); 1661return (vector.AsUInt16() & Vector512.Create((ushort)0xFF80)) == Vector512<ushort>.Zero; 1703: Vector512.Narrow(vectorFirst, vectorSecond); 1950const nuint MaskOfAllBitsInVector512 = (nuint)(Vector512.Size - 1); 1956Debug.Assert(Vector512.IsHardwareAccelerated, "Vector512 is required."); 1958Debug.Assert(elementCount >= 2 * Vector512.Size); 1962Vector512<ushort> utf16VectorFirst = Vector512.LoadUnsafe(ref utf16Buffer); 1975nuint currentOffsetInElements = Vector512.Size / 2; // we processed 32 elements so far 1988if (((uint)pAsciiBuffer & (Vector512.Size / 2)) == 0) 1992utf16VectorFirst = Vector512.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 2007currentOffsetInElements = Vector512.Size - ((nuint)pAsciiBuffer & MaskOfAllBitsInVector512); 2009Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= Vector512.Size, "We wrote at least 1 byte but no more than a whole vector."); 2011Debug.Assert(elementCount - currentOffsetInElements >= Vector512.Size, "We should be able to run at least one whole vector."); 2013nuint finalOffsetWhereCanRunLoop = elementCount - Vector512.Size; 2018utf16VectorFirst = Vector512.LoadUnsafe(ref utf16Buffer, currentOffsetInElements); 2019Vector512<ushort> utf16VectorSecond = Vector512.LoadUnsafe(ref utf16Buffer, currentOffsetInElements + Vector512.Size / sizeof(short)); 2029Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector512.Size == 0, "Write should be aligned."); 2033currentOffsetInElements += Vector512.Size; 2055currentOffsetInElements += Vector512.Size / 2; 2075if (Vector512.IsHardwareAccelerated && (elementCount - currentOffset) >= (uint)Vector512<byte>.Count) 2256(Vector512<ushort> Lower512, Vector512<ushort> Upper512) = Vector512.Widen((Vector512<byte>)(object)vector);
System.Runtime.Intrinsics (1)
artifacts\obj\System.Runtime.Intrinsics\Debug\net10.0\System.Runtime.Intrinsics.Forwards.cs (1)
19[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Intrinsics.Vector512))]
System.Runtime.Numerics (3)
System\Numerics\NumericsHelpers.cs (3)
129while (Vector512.IsHardwareAccelerated && d.Length - offset >= Vector512<uint>.Count) 131Vector512<uint> complement = ~Vector512.LoadUnsafe(ref start, (nuint)offset); 132Vector512.StoreUnsafe(complement, ref start, (nuint)offset);