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