316 references to Count
System.Formats.Asn1 (42)
System\Formats\Asn1\AsnCharacterStringEncodings.net.cs (42)
20if (chars.Length >= Vector<byte>.Count && Vector.IsHardwareAccelerated) 30if (bytes.Length >= Vector<byte>.Count && Vector.IsHardwareAccelerated) 45Debug.Assert(Vector<byte>.Count == 2 * Vector<ushort>.Count); 51while (source.Length >= Vector<byte>.Count) 54Vector<ushort> upper = new Vector<ushort>(source.Slice(Vector<ushort>.Count)); 65destination = destination.Slice(Vector<byte>.Count); 68source = source.Slice(Vector<byte>.Count); 69position += Vector<byte>.Count; 80Debug.Assert(Vector<byte>.Count == 2 * Vector<ushort>.Count); 88while (source.Length >= Vector<byte>.Count) 102upper.CopyTo(destination.Slice(Vector<ushort>.Count)); 103destination = destination.Slice(Vector<byte>.Count); 106source = source.Slice(Vector<byte>.Count); 107position += Vector<byte>.Count; 221if (chars.Length >= Vector<byte>.Count && Vector.IsHardwareAccelerated) 251if (bytes.Length >= Vector<byte>.Count && Vector.IsHardwareAccelerated) 286Debug.Assert(Vector<byte>.Count == 2 * Vector<ushort>.Count); 294while (source.Length >= Vector<byte>.Count) 297Vector<ushort> upper = new Vector<ushort>(source.Slice(Vector<ushort>.Count)); 310destination = destination.Slice(Vector<byte>.Count); 313source = source.Slice(Vector<byte>.Count); 314position += Vector<byte>.Count; 325Debug.Assert(Vector<byte>.Count == 2 * Vector<ushort>.Count); 335while (source.Length >= Vector<byte>.Count) 351upper.CopyTo(destination.Slice(Vector<ushort>.Count)); 352destination = destination.Slice(Vector<byte>.Count); 355source = source.Slice(Vector<byte>.Count); 356position += Vector<byte>.Count; 400if (chars.Length >= Vector<ushort>.Count && Vector.IsHardwareAccelerated) 452if (bytes.Length >= Vector<ushort>.Count * sizeof(ushort) && Vector.IsHardwareAccelerated) 498while (source.Length >= Vector<ushort>.Count) 511destination = destination.Slice(Vector<ushort>.Count); 514source = source.Slice(Vector<ushort>.Count); 515position += Vector<ushort>.Count; 534while (source.Length >= Vector<ushort>.Count) 547destination = destination.Slice(Vector<ushort>.Count); 550source = source.Slice(Vector<ushort>.Count); 551position += Vector<ushort>.Count;
System.Formats.Tar (1)
System\Formats\Tar\TarHeader.Write.cs (1)
989int vectorSize = Vector<byte>.Count;
System.Linq (19)
System\Linq\Average.cs (3)
32if (Vector.IsHardwareAccelerated && span.Length >= Vector<int>.Count) 40i += Vector<int>.Count; 42while (i <= span.Length - Vector<int>.Count);
System\Linq\Range.cs (4)
82destination.Length >= Vector<T>.Count) 85Vector<T> increment = new Vector<T>(T.CreateTruncating(Vector<T>.Count)); 87while (destination.Length >= Vector<T>.Count) 91destination = destination.Slice(Vector<T>.Count);
System\Linq\Sum.cs (12)
53&& Vector<T>.Count > 2 54&& span.Length >= Vector<T>.Count * 4) 82Debug.Assert(span.Length >= Vector<T>.Count * 4); 83Debug.Assert(Vector<T>.Count > 2); 120while (span.Length >= Vector<T>.Count * 4) 127data = Vector.Create(span.Slice(Vector<T>.Count)); 131data = Vector.Create(span.Slice(Vector<T>.Count * 2)); 135data = Vector.Create(span.Slice(Vector<T>.Count * 3)); 139span = span.Slice(Vector<T>.Count * 4); 143while (span.Length >= Vector<T>.Count) 150span = span.Slice(Vector<T>.Count); 161for (int i = 0; i < Vector<T>.Count; i++)
System.Net.WebSockets (3)
System\Net\WebSockets\ManagedWebSocket.cs (3)
1705if (Vector.IsHardwareAccelerated && toMask.Length >= Vector<byte>.Count) 1711toMask = toMask.Slice(Vector<byte>.Count); 1713while (toMask.Length >= Vector<byte>.Count);
System.Private.CoreLib (247)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector_1.cs (40)
48/// <returns>A new <see cref="Vector{T}" /> with its elements set to the first <see cref="Vector{T}.Count" /> elements from <paramref name="values" />.</returns> 50/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector{T}.Count" />.</exception> 56if (values.Length < Count) 67/// <returns>A new <see cref="Vector{T}" /> with its elements set to the first <see cref="Vector{T}.Count" /> elements from <paramref name="values" />.</returns> 69/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" />, starting from <paramref name="index" />, is less than <see cref="Vector{T}.Count" />.</exception> 75if ((index < 0) || ((values.Length - index) < Count)) 85/// <returns>A new <see cref="Vector{T}" /> with its elements set to the first <see cref="Vector{T}.Count" /> elements from <paramref name="values" />.</returns> 86/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector{T}.Count" />.</exception> 92if (values.Length < Count) 110if (values.Length < Vector<byte>.Count) 120/// <returns>A new <see cref="Vector{T}" /> with its elements set to the first <see cref="Vector{T}.Count" /> elements from <paramref name="values" />.</returns> 121/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector{T}.Count" />.</exception> 158for (int i = 0; i < Count; i++) 219for (int index = 0; index < Count; index++) 242for (int index = 0; index < Vector<ulong>.Count; index++) 265for (int index = 0; index < Vector<ulong>.Count; index++) 284for (int index = 0; index < Count; index++) 303for (int index = 0; index < Count; index++) 320for (int index = 0; index < Count; index++) 344for (int index = 0; index < Vector<ulong>.Count; index++) 459for (int index = 0; index < Count; index++) 478for (int index = 0; index < Count; index++) 513for (int index = 0; index < Vector<ulong>.Count; index++) 532for (int index = 0; index < Count; index++) 551for (int index = 0; index < Count; index++) 602for (int index = 0; index < Count; index++) 614/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 620if (destination.Length < Count) 632/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 644if ((destination.Length - startIndex) < Count) 660if (destination.Length < Vector<byte>.Count) 670/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 674if (destination.Length < Count) 713for (int index = 0; index < Count; index++) 730for (int index = 0; index < Count; index++) 762for (int i = 1; i < Count; i++) 781if (destination.Length < Vector<byte>.Count) 792/// <returns><c>true</c> if the current instance was successfully copied to <paramref name="destination" />; otherwise, <c>false</c> if the length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</returns> 796if (destination.Length < Count) 813static int ISimdVector<Vector<T>, T>.ElementCount => Vector<T>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (161)
16internal static int Alignment => Vector<byte>.Count; 129for (int index = 0; index < Vector<T>.Count; index++) 156for (int index = 0; index < Vector<T>.Count; index++) 366for (int index = 0; index < Vector<T>.Count; index++) 390for (int index = 0; index < Vector<double>.Count; index++) 409for (int index = 0; index < Vector<float>.Count; index++) 470if (Vector<double>.Count == Vector512<double>.Count) 474else if (Vector<double>.Count == Vector256<double>.Count) 480Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 493if (Vector<double>.Count == Vector512<double>.Count) 497else if (Vector<double>.Count == Vector256<double>.Count) 503Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 516for (int i = 0; i < Vector<int>.Count; i++) 533for (int i = 0; i < Vector<int>.Count; i++) 550for (int i = 0; i < Vector<long>.Count; i++) 567for (int i = 0; i < Vector<long>.Count; i++) 584for (int i = 0; i < Vector<float>.Count; i++) 601if (Vector<float>.Count == Vector512<float>.Count) 605else if (Vector<float>.Count == Vector256<float>.Count) 611Debug.Assert(Vector<float>.Count == Vector128<float>.Count); 625for (int i = 0; i < Vector<uint>.Count; i++) 643for (int i = 0; i < Vector<uint>.Count; i++) 661for (int i = 0; i < Vector<ulong>.Count; i++) 679for (int i = 0; i < Vector<ulong>.Count; i++) 693for (int index = 0; index < Vector<T>.Count; index++) 747for (int index = 0; index < Vector<T>.Count; index++) 764if (Vector<T>.Count == Vector512<T>.Count) 768else if (Vector<T>.Count == Vector256<T>.Count) 774Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 808for (int index = 0; index < Vector<T>.Count; index++) 819/// <returns>A new <see cref="Vector{T}" /> with its elements set to the first <see cref="Vector{T}.Count" /> elements from <paramref name="values" />.</returns> 825if (values.Length < Vector<T>.Count) 883if (Vector<T>.Count == Vector512<T>.Count) 887else if (Vector<T>.Count == Vector256<T>.Count) 893Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 910for (int index = 1; index < Vector<T>.Count; index += 2) 938if (Vector<T>.Count == Vector512<T>.Count) 942else if (Vector<T>.Count == Vector256<T>.Count) 948Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 962if (Vector<T>.Count == Vector512<T>.Count) 966else if (Vector<T>.Count == Vector256<T>.Count) 972Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 986if (Vector<T>.Count == Vector512<T>.Count) 990else if (Vector<T>.Count == Vector256<T>.Count) 996Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1010if (Vector<T>.Count == Vector512<T>.Count) 1014else if (Vector<T>.Count == Vector256<T>.Count) 1020Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1034if (Vector<T>.Count == Vector512<T>.Count) 1038else if (Vector<T>.Count == Vector256<T>.Count) 1044Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1058if (Vector<T>.Count == Vector512<T>.Count) 1062else if (Vector<T>.Count == Vector256<T>.Count) 1068Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1091if (Vector<T>.Count == Vector512<T>.Count) 1095else if (Vector<T>.Count == Vector256<T>.Count) 1101Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1115if (Vector<T>.Count == Vector512<T>.Count) 1119else if (Vector<T>.Count == Vector256<T>.Count) 1125Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1147if (Vector<T>.Count == Vector512<T>.Count) 1151else if (Vector<T>.Count == Vector256<T>.Count) 1157Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1167for (int index = 0; index < Vector<T>.Count; index++) 1241for (int index = 0; index < Vector<T>.Count; index++) 1295for (int index = 0; index < Vector<T>.Count; index++) 1311for (int index = 0; index < Vector<T>.Count; index++) 1359for (int index = 0; index < Vector<T>.Count; index++) 1383for (int index = 0; index < Vector<double>.Count; index++) 1402for (int index = 0; index < Vector<float>.Count; index++) 1426for (int index = 0; index < Vector<double>.Count; index++) 1450for (int index = 0; index < Vector<float>.Count; index++) 1470if ((uint)(index) >= (uint)(Vector<T>.Count)) 1489for (int index = 0; index < Vector<T>.Count; index++) 1535for (int index = 0; index < Vector<T>.Count; index++) 1555for (int index = 0; index < Vector<T>.Count; index++) 1577for (int index = 0; index < Vector<T>.Count; index++) 1623for (int index = 0; index < Vector<T>.Count; index++) 1643for (int index = 0; index < Vector<T>.Count; index++) 1659for (int index = 0; index < Vector<T>.Count; index++) 1701if (Vector<T>.Count == Vector512<T>.Count) 1705else if (Vector<T>.Count == Vector256<T>.Count) 1711Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1939if (Vector<T>.Count == Vector512<T>.Count) 1943else if (Vector<T>.Count == Vector256<T>.Count) 1949Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1978for (int index = 0; index < Vector<T>.Count; index++) 2036for (int index = 0; index < Vector<T>.Count; index++) 2082for (int index = 0; index < Vector<T>.Count; index++) 2102for (int index = 0; index < Vector<T>.Count; index++) 2124for (int index = 0; index < Vector<T>.Count; index++) 2170for (int index = 0; index < Vector<T>.Count; index++) 2190for (int index = 0; index < Vector<T>.Count; index++) 2275for (int index = 0; index < Vector<T>.Count; index++) 2317for (int index = 0; index < Vector<T>.Count; index++) 2367for (int index = 0; index < Vector<T>.Count; index++) 2390for (int index = 0; index < Vector<T>.Count; index++) 2413for (int index = 0; index < Vector<T>.Count; index++) 2446for (int index = 0; index < Vector<T>.Count; index++) 2469for (int index = 0; index < Vector<T>.Count; index++) 2492for (int index = 0; index < Vector<T>.Count; index++) 2515for (int index = 0; index < Vector<T>.Count; index++) 2538for (int index = 0; index < Vector<T>.Count; index++) 2571for (int index = 0; index < Vector<T>.Count; index++) 2594for (int index = 0; index < Vector<T>.Count; index++) 2634for (int index = 0; index < Vector<T>.Count; index++) 2650for (int index = 0; index < Vector<double>.Count; index++) 2666for (int index = 0; index < Vector<float>.Count; index++) 2683for (int i = 0; i < Vector<TSource>.Count; i++) 2689for (int i = Vector<TSource>.Count; i < Vector<TResult>.Count; i++) 2691TResult value = TResult.CreateTruncating(high.GetElementUnsafe(i - Vector<TSource>.Count)); 2752for (int i = 0; i < Vector<TSource>.Count; i++) 2758for (int i = Vector<TSource>.Count; i < Vector<TResult>.Count; i++) 2760TResult value = TResult.CreateSaturating(high.GetElementUnsafe(i - Vector<TSource>.Count)); 2856for (int index = 0; index < Vector<T>.Count; index++) 2901for (int index = 0; index < Vector<T>.Count; index++) 3001if (Vector<uint>.Count == Vector512<uint>.Count) 3005else if (Vector<uint>.Count == Vector256<uint>.Count) 3011Debug.Assert(Vector<uint>.Count == Vector128<uint>.Count); 3027if (Vector<ulong>.Count == Vector512<ulong>.Count) 3031else if (Vector<ulong>.Count == Vector256<ulong>.Count) 3037Debug.Assert(Vector<ulong>.Count == Vector128<ulong>.Count); 3158for (int index = 0; index < Vector<T>.Count; index++) 3201for (int index = 0; index < Vector<T>.Count; index++) 3250for (int index = 0; index < Vector<T>.Count; index++) 3345for (int index = 0; index < Vector<T>.Count; index++) 3364for (int index = 0; index < Vector<T>.Count; index++) 3392for (int index = 0; index < Vector<T>.Count; index++) 3547for (int i = 0; i < Vector<ushort>.Count; i++) 3565for (int i = 0; i < Vector<int>.Count; i++) 3583for (int i = 0; i < Vector<long>.Count; i++) 3602for (int i = 0; i < Vector<short>.Count; i++) 3620for (int i = 0; i < Vector<double>.Count; i++) 3639for (int i = 0; i < Vector<uint>.Count; i++) 3658for (int i = 0; i < Vector<ulong>.Count; i++) 3677for (int i = Vector<ushort>.Count; i < Vector<byte>.Count; i++) 3680upper.SetElementUnsafe(i - Vector<ushort>.Count, value); 3695for (int i = Vector<int>.Count; i < Vector<short>.Count; i++) 3698upper.SetElementUnsafe(i - Vector<int>.Count, value); 3713for (int i = Vector<long>.Count; i < Vector<int>.Count; i++) 3716upper.SetElementUnsafe(i - Vector<long>.Count, value); 3732for (int i = Vector<short>.Count; i < Vector<sbyte>.Count; i++) 3735upper.SetElementUnsafe(i - Vector<short>.Count, value); 3750for (int i = Vector<double>.Count; i < Vector<float>.Count; i++) 3753upper.SetElementUnsafe(i - Vector<double>.Count, value); 3769for (int i = Vector<uint>.Count; i < Vector<ushort>.Count; i++) 3772upper.SetElementUnsafe(i - Vector<uint>.Count, value); 3788for (int i = Vector<ulong>.Count; i < Vector<uint>.Count; i++) 3791upper.SetElementUnsafe(i - Vector<ulong>.Count, value); 3808if ((uint)(index) >= (uint)(Vector<T>.Count)) 3829Debug.Assert((index >= 0) && (index < Vector<T>.Count)); 3837Debug.Assert((index >= 0) && (index < Vector<T>.Count));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\VectorDebugView_1.cs (12)
22var items = new byte[Vector<byte>.Count]; 32var items = new double[Vector<double>.Count]; 42var items = new short[Vector<short>.Count]; 52var items = new int[Vector<int>.Count]; 62var items = new long[Vector<long>.Count]; 72var items = new nint[Vector<nint>.Count]; 82var items = new nuint[Vector<nuint>.Count]; 92var items = new sbyte[Vector<sbyte>.Count]; 102var items = new float[Vector<float>.Count]; 112var items = new ushort[Vector<ushort>.Count]; 122var items = new uint[Vector<uint>.Count]; 132var items = new ulong[Vector<ulong>.Count];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.Numerics.cs (2)
103Debug.Assert(Vector<T>.Count >= Vector128<T>.Count); 175Debug.Assert(Vector<T>.Count >= Vector128<T>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
372if (Vector<T>.Count >= Vector256<T>.Count) 396if (Vector256<T>.Count >= Vector<T>.Count)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (2)
370Debug.Assert(Vector512<T>.Count >= Vector<T>.Count); 387Debug.Assert(Vector512<T>.Count >= Vector<T>.Count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.ByteMemOps.cs (7)
501if (len >= (nuint)Vector<byte>.Count) 505nuint stopLoopAtOffset = len & (nuint)(nint)(2 * (int)-Vector<byte>.Count); // intentional sign extension carries the negative bit 511if (len >= (uint)(2 * Vector<byte>.Count)) 516Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest, offset + (nuint)Vector<byte>.Count), vector); 517offset += (uint)(2 * Vector<byte>.Count); 526if ((len & (nuint)Vector<byte>.Count) != 0) 537Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest, len - (nuint)Vector<byte>.Count), vector);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (3)
481if (Vector.IsHardwareAccelerated && minLength >= (nuint)Vector<ushort>.Count) 483nuint nLength = minLength - (nuint)Vector<ushort>.Count; 491i += (nuint)Vector<ushort>.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (12)
33if (sizeof(T) > Vector<byte>.Count) 43if (numElements >= (uint)(Vector<byte>.Count / sizeof(T))) 70else if (sizeof(T) == Vector<byte>.Count) 76if (Vector<byte>.Count == 32) 80else if (Vector<byte>.Count == 64) 92if (Vector<byte>.Count == 64) 110nuint stopLoopAtOffset = totalByteLength & (nuint)(nint)(2 * (int)-Vector<byte>.Count); // intentional sign extension carries the negative bit 117if (numElements >= (uint)(2 * Vector<byte>.Count / sizeof(T))) 122Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref refDataAsBytes, offset + (nuint)Vector<byte>.Count), vector); 123offset += (uint)(2 * Vector<byte>.Count); 133if ((totalByteLength & (nuint)Vector<byte>.Count) != 0) 145Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref refDataAsBytes, totalByteLength - (nuint)Vector<byte>.Count), vector);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (6)
46if (Vector.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector<ushort>.Count) 48uint SizeOfVectorInChars = (uint)Vector<ushort>.Count; // JIT will make this a const 49uint SizeOfVectorInBytes = (uint)Vector<byte>.Count; // JIT will make this a const 615Vector<ushort> utf16VectorLow = Unsafe.ReadUnaligned<Vector<ushort>>(pUtf16Buffer + currentOffset + Vector<ushort>.Count); 1080uint SizeOfVector = (uint)Vector<byte>.Count; // JIT will make this a const 1093Unsafe.WriteUnaligned(pUtf16Buffer + currentOffset + Vector<ushort>.Count, utf16HighVector);
System.ServiceModel.Http (2)
System\ServiceModel\Channels\HttpTransportSecurityHelpers.cs (2)
129if ((i + Vector<byte>.Count) > certRawData.Length) 152i += Vector<byte>.Count;
System.Text.Encodings.Web (2)
System\Text\Encodings\Web\AllowedBmpCodePointsBitmap.cs (2)
97definedCharsBitmapAsLittleEndian = definedCharsBitmapAsLittleEndian.Slice(Vector<byte>.Count); 98thisAllowedCharactersBitmap = thisAllowedCharactersBitmap.Slice(Vector<uint>.Count);