286 references to Count
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
AsciiDecoding.cs (1)
57for (var length = 1; length < Vector<sbyte>.Count * 4; length++)
UTF8Decoding.cs (1)
32for (var length = bytes.Length; length < Vector<sbyte>.Count * 4 + bytes.Length; length++)
Microsoft.Data.Analysis (44)
Computations\Arithmetic.netstandard.cs (44)
171var vectorSize = Vector<byte>.Count; 225var vectorSize = Vector<byte>.Count; 279var vectorSize = Vector<byte>.Count; 338var vectorSize = Vector<byte>.Count; 640var vectorSize = Vector<char>.Count; 694var vectorSize = Vector<char>.Count; 748var vectorSize = Vector<char>.Count; 807var vectorSize = Vector<char>.Count; 1383var vectorSize = Vector<double>.Count; 1437var vectorSize = Vector<double>.Count; 1491var vectorSize = Vector<double>.Count; 1550var vectorSize = Vector<double>.Count; 1741var vectorSize = Vector<float>.Count; 1795var vectorSize = Vector<float>.Count; 1849var vectorSize = Vector<float>.Count; 1908var vectorSize = Vector<float>.Count; 2099var vectorSize = Vector<int>.Count; 2153var vectorSize = Vector<int>.Count; 2207var vectorSize = Vector<int>.Count; 2266var vectorSize = Vector<int>.Count; 2568var vectorSize = Vector<long>.Count; 2622var vectorSize = Vector<long>.Count; 2676var vectorSize = Vector<long>.Count; 2735var vectorSize = Vector<long>.Count; 3037var vectorSize = Vector<sbyte>.Count; 3091var vectorSize = Vector<sbyte>.Count; 3145var vectorSize = Vector<sbyte>.Count; 3204var vectorSize = Vector<sbyte>.Count; 3506var vectorSize = Vector<short>.Count; 3560var vectorSize = Vector<short>.Count; 3614var vectorSize = Vector<short>.Count; 3673var vectorSize = Vector<short>.Count; 3975var vectorSize = Vector<uint>.Count; 4029var vectorSize = Vector<uint>.Count; 4083var vectorSize = Vector<uint>.Count; 4142var vectorSize = Vector<uint>.Count; 4444var vectorSize = Vector<ulong>.Count; 4498var vectorSize = Vector<ulong>.Count; 4552var vectorSize = Vector<ulong>.Count; 4611var vectorSize = Vector<ulong>.Count; 4913var vectorSize = Vector<ushort>.Count; 4967var vectorSize = Vector<ushort>.Count; 5021var vectorSize = Vector<ushort>.Count; 5080var vectorSize = Vector<ushort>.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)
87destination.Length >= Vector<T>.Count) 91Vector<T> increment = new Vector<T>(T.CreateTruncating(Vector<T>.Count)); 93ref T oneVectorFromEnd = ref Unsafe.Subtract(ref end, Vector<T>.Count); 98pos = ref Unsafe.Add(ref pos, Vector<T>.Count);
System\Linq\Sum.cs (12)
54&& Vector<T>.Count > 2 55&& span.Length >= Vector<T>.Count * 4) 83Debug.Assert(span.Length >= Vector<T>.Count * 4); 84Debug.Assert(Vector<T>.Count > 2); 124nuint limit = length - (nuint)Vector<T>.Count * 4; 132data = Vector.LoadUnsafe(ref ptr, index + (nuint)Vector<T>.Count); 136data = Vector.LoadUnsafe(ref ptr, index + (nuint)Vector<T>.Count * 2); 140data = Vector.LoadUnsafe(ref ptr, index + (nuint)Vector<T>.Count * 3); 149index += (nuint)Vector<T>.Count * 4; 153limit = length - (nuint)Vector<T>.Count; 165index += (nuint)Vector<T>.Count; 177for (int i = 0; i < Vector<T>.Count; i++)
System.Net.WebSockets (3)
System\Net\WebSockets\ManagedWebSocket.cs (3)
1671if (Vector.IsHardwareAccelerated && (toMaskEnd - toMaskPtr) >= Vector<byte>.Count) 1677toMaskPtr += Vector<byte>.Count; 1679while (toMaskEnd - toMaskPtr >= Vector<byte>.Count);
System.Private.CoreLib (216)
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (130)
15internal static int Alignment => Vector<byte>.Count; 46for (int index = 0; index < Vector<T>.Count; index++) 73for (int index = 0; index < Vector<T>.Count; index++) 300for (int index = 0; index < Vector<T>.Count; index++) 320for (int index = 0; index < Vector<double>.Count; index++) 339for (int index = 0; index < Vector<float>.Count; index++) 400if (Vector<double>.Count == Vector512<double>.Count) 404else if (Vector<double>.Count == Vector256<double>.Count) 410Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 423if (Vector<double>.Count == Vector512<double>.Count) 427else if (Vector<double>.Count == Vector256<double>.Count) 433Debug.Assert(Vector<double>.Count == Vector128<double>.Count); 446for (int i = 0; i < Vector<int>.Count; i++) 463for (int i = 0; i < Vector<int>.Count; i++) 480for (int i = 0; i < Vector<long>.Count; i++) 497for (int i = 0; i < Vector<long>.Count; i++) 514for (int i = 0; i < Vector<float>.Count; i++) 531if (Vector<float>.Count == Vector512<float>.Count) 535else if (Vector<float>.Count == Vector256<float>.Count) 541Debug.Assert(Vector<float>.Count == Vector128<float>.Count); 555for (int i = 0; i < Vector<uint>.Count; i++) 573for (int i = 0; i < Vector<uint>.Count; i++) 591for (int i = 0; i < Vector<ulong>.Count; i++) 609for (int i = 0; i < Vector<ulong>.Count; i++) 623for (int index = 0; index < Vector<T>.Count; index++) 681for (int index = 0; index < Vector<T>.Count; index++) 698if (Vector<T>.Count == Vector512<T>.Count) 702else if (Vector<T>.Count == Vector256<T>.Count) 708Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 742for (int index = 0; index < Vector<T>.Count; index++) 753/// <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> 759if (values.Length < Vector<T>.Count) 812for (int index = 0; index < Vector<T>.Count; index++) 886for (int index = 0; index < Vector<T>.Count; index++) 940for (int index = 0; index < Vector<T>.Count; index++) 956for (int index = 0; index < Vector<T>.Count; index++) 1017for (int index = 0; index < Vector<T>.Count; index++) 1037for (int index = 0; index < Vector<double>.Count; index++) 1056for (int index = 0; index < Vector<float>.Count; index++) 1080for (int index = 0; index < Vector<double>.Count; index++) 1104for (int index = 0; index < Vector<float>.Count; index++) 1124if ((uint)(index) >= (uint)(Vector<T>.Count)) 1143for (int index = 0; index < Vector<T>.Count; index++) 1189for (int index = 0; index < Vector<T>.Count; index++) 1209for (int index = 0; index < Vector<T>.Count; index++) 1231for (int index = 0; index < Vector<T>.Count; index++) 1277for (int index = 0; index < Vector<T>.Count; index++) 1297for (int index = 0; index < Vector<T>.Count; index++) 1313for (int index = 0; index < Vector<T>.Count; index++) 1355if (Vector<T>.Count == Vector512<T>.Count) 1359else if (Vector<T>.Count == Vector256<T>.Count) 1365Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1601if (Vector<T>.Count == Vector512<T>.Count) 1605else if (Vector<T>.Count == Vector256<T>.Count) 1611Debug.Assert(Vector<T>.Count == Vector128<T>.Count); 1640for (int index = 0; index < Vector<T>.Count; index++) 1698for (int index = 0; index < Vector<T>.Count; index++) 1744for (int index = 0; index < Vector<T>.Count; index++) 1764for (int index = 0; index < Vector<T>.Count; index++) 1786for (int index = 0; index < Vector<T>.Count; index++) 1832for (int index = 0; index < Vector<T>.Count; index++) 1852for (int index = 0; index < Vector<T>.Count; index++) 1937for (int index = 0; index < Vector<T>.Count; index++) 1979for (int index = 0; index < Vector<T>.Count; index++) 2029for (int index = 0; index < Vector<T>.Count; index++) 2052for (int index = 0; index < Vector<T>.Count; index++) 2075for (int index = 0; index < Vector<T>.Count; index++) 2098for (int index = 0; index < Vector<T>.Count; index++) 2121for (int index = 0; index < Vector<T>.Count; index++) 2144for (int index = 0; index < Vector<T>.Count; index++) 2167for (int index = 0; index < Vector<T>.Count; index++) 2190for (int index = 0; index < Vector<T>.Count; index++) 2213for (int index = 0; index < Vector<T>.Count; index++) 2236for (int index = 0; index < Vector<T>.Count; index++) 2276for (int index = 0; index < Vector<T>.Count; index++) 2292for (int index = 0; index < Vector<double>.Count; index++) 2308for (int index = 0; index < Vector<float>.Count; index++) 2325for (int i = 0; i < Vector<TSource>.Count; i++) 2331for (int i = Vector<TSource>.Count; i < Vector<TResult>.Count; i++) 2333TResult value = TResult.CreateTruncating(high.GetElementUnsafe(i - Vector<TSource>.Count)); 2394for (int i = 0; i < Vector<TSource>.Count; i++) 2400for (int i = Vector<TSource>.Count; i < Vector<TResult>.Count; i++) 2402TResult value = TResult.CreateSaturating(high.GetElementUnsafe(i - Vector<TSource>.Count)); 2498for (int index = 0; index < Vector<T>.Count; index++) 2556for (int index = 0; index < Vector<T>.Count; index++) 2652if (Vector<uint>.Count == Vector512<uint>.Count) 2656else if (Vector<uint>.Count == Vector256<uint>.Count) 2662Debug.Assert(Vector<uint>.Count == Vector128<uint>.Count); 2678if (Vector<ulong>.Count == Vector512<ulong>.Count) 2682else if (Vector<ulong>.Count == Vector256<ulong>.Count) 2688Debug.Assert(Vector<ulong>.Count == Vector128<ulong>.Count); 2809for (int index = 0; index < Vector<T>.Count; index++) 2852for (int index = 0; index < Vector<T>.Count; index++) 2900for (int index = 0; index < Vector<T>.Count; index++) 2995for (int index = 0; index < Vector<T>.Count; index++) 3014for (int index = 0; index < Vector<T>.Count; index++) 3055for (int index = 0; index < Vector<T>.Count; index++) 3206for (int i = 0; i < Vector<ushort>.Count; i++) 3224for (int i = 0; i < Vector<int>.Count; i++) 3242for (int i = 0; i < Vector<long>.Count; i++) 3261for (int i = 0; i < Vector<short>.Count; i++) 3279for (int i = 0; i < Vector<double>.Count; i++) 3298for (int i = 0; i < Vector<uint>.Count; i++) 3317for (int i = 0; i < Vector<ulong>.Count; i++) 3336for (int i = Vector<ushort>.Count; i < Vector<byte>.Count; i++) 3339upper.SetElementUnsafe(i - Vector<ushort>.Count, value); 3354for (int i = Vector<int>.Count; i < Vector<short>.Count; i++) 3357upper.SetElementUnsafe(i - Vector<int>.Count, value); 3372for (int i = Vector<long>.Count; i < Vector<int>.Count; i++) 3375upper.SetElementUnsafe(i - Vector<long>.Count, value); 3391for (int i = Vector<short>.Count; i < Vector<sbyte>.Count; i++) 3394upper.SetElementUnsafe(i - Vector<short>.Count, value); 3409for (int i = Vector<double>.Count; i < Vector<float>.Count; i++) 3412upper.SetElementUnsafe(i - Vector<double>.Count, value); 3428for (int i = Vector<uint>.Count; i < Vector<ushort>.Count; i++) 3431upper.SetElementUnsafe(i - Vector<uint>.Count, value); 3447for (int i = Vector<ulong>.Count; i < Vector<uint>.Count; i++) 3450upper.SetElementUnsafe(i - Vector<ulong>.Count, value); 3467if ((uint)(index) >= (uint)(Vector<T>.Count)) 3488Debug.Assert((index >= 0) && (index < Vector<T>.Count)); 3496Debug.Assert((index >= 0) && (index < Vector<T>.Count));
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++) 230for (int index = 0; index < Count; index++) 253for (int index = 0; index < Vector<ulong>.Count; index++) 276for (int index = 0; index < Vector<ulong>.Count; index++) 295for (int index = 0; index < Count; index++) 314for (int index = 0; index < Count; index++) 331for (int index = 0; index < Count; index++) 355for (int index = 0; index < Vector<ulong>.Count; index++) 470for (int index = 0; index < Count; index++) 489for (int index = 0; index < Count; index++) 524for (int index = 0; index < Vector<ulong>.Count; index++) 543for (int index = 0; index < Count; index++) 562for (int index = 0; index < Count; index++) 613for (int index = 0; index < Count; index++) 625/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 631if (destination.Length < Count) 643/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 655if ((destination.Length - startIndex) < Count) 671if (destination.Length < Vector<byte>.Count) 681/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 685if (destination.Length < Count) 724for (int index = 0; index < Count; index++) 741for (int index = 0; index < Count; index++) 773for (int i = 1; i < Count; i++) 792if (destination.Length < Vector<byte>.Count) 803/// <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> 807if (destination.Length < Count) 824static int ISimdVector<Vector<T>, T>.ElementCount => Vector<T>.Count;
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\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.Numerics.cs (2)
138Debug.Assert(Vector<T>.Count >= Vector128<T>.Count); 217Debug.Assert(Vector<T>.Count >= Vector128<T>.Count);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
293if (Vector<T>.Count >= Vector256<T>.Count) 317if (Vector256<T>.Count >= Vector<T>.Count)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (2)
290Debug.Assert(Vector512<T>.Count >= Vector<T>.Count); 307Debug.Assert(Vector512<T>.Count >= Vector<T>.Count);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.ByteMemOps.cs (7)
438if (len >= (nuint)Vector<byte>.Count) 442nuint stopLoopAtOffset = len & (nuint)(nint)(2 * (int)-Vector<byte>.Count); // intentional sign extension carries the negative bit 448if (len >= (uint)(2 * Vector<byte>.Count)) 453Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest, offset + (nuint)Vector<byte>.Count), vector); 454offset += (uint)(2 * Vector<byte>.Count); 463if ((len & (nuint)Vector<byte>.Count) != 0) 474Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest, len - (nuint)Vector<byte>.Count), vector);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (3)
480if (Vector.IsHardwareAccelerated && minLength >= (nuint)Vector<ushort>.Count) 482nuint nLength = minLength - (nuint)Vector<ushort>.Count; 490i += (nuint)Vector<ushort>.Count;
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (12)
25if (sizeof(T) > Vector<byte>.Count) { goto CannotVectorize; } 28if (numElements >= (uint)(Vector<byte>.Count / sizeof(T))) 56else if (sizeof(T) == Vector<byte>.Count) 62if (Vector<byte>.Count == 32) 66else if (Vector<byte>.Count == 64) 78if (Vector<byte>.Count == 64) 96nuint stopLoopAtOffset = totalByteLength & (nuint)(nint)(2 * (int)-Vector<byte>.Count); // intentional sign extension carries the negative bit 103if (numElements >= (uint)(2 * Vector<byte>.Count / sizeof(T))) 108Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref refDataAsBytes, offset + (nuint)Vector<byte>.Count), vector); 109offset += (uint)(2 * Vector<byte>.Count); 119if ((totalByteLength & (nuint)Vector<byte>.Count) != 0) 131Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref refDataAsBytes, totalByteLength - (nuint)Vector<byte>.Count), vector);
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (6)
45if (Vector.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector<ushort>.Count) 47uint SizeOfVectorInChars = (uint)Vector<ushort>.Count; // JIT will make this a const 48uint SizeOfVectorInBytes = (uint)Vector<byte>.Count; // JIT will make this a const 614Vector<ushort> utf16VectorLow = Unsafe.ReadUnaligned<Vector<ushort>>(pUtf16Buffer + currentOffset + Vector<ushort>.Count); 1079uint SizeOfVector = (uint)Vector<byte>.Count; // JIT will make this a const 1092Unsafe.WriteUnaligned(pUtf16Buffer + currentOffset + Vector<ushort>.Count, utf16HighVector);
System.Text.Encodings.Web (2)
System\Text\Encodings\Web\AllowedBmpCodePointsBitmap.cs (2)
78definedCharsBitmapAsLittleEndian = definedCharsBitmapAsLittleEndian.Slice(Vector<byte>.Count); 79thisAllowedCharactersBitmap = thisAllowedCharactersBitmap.Slice(Vector<uint>.Count);