1320 references to Count
GenerateDocumentationAndConfigFiles (24)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (24)
503
for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.
Count
)
562
Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.
Count
);
563
Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 2);
564
Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 3);
573
source += Vector128<byte>.
Count
;
575
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
);
577
source += Vector128<byte>.
Count
;
579
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 2);
581
source += Vector128<byte>.
Count
;
583
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 3);
585
source += Vector128<byte>.
Count
;
593
acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
));
594
acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 2));
595
acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 3));
600
Vector128.Store(acc2, accumulators + Vector128<ulong>.
Count
);
601
Vector128.Store(acc3, accumulators + Vector128<ulong>.
Count
* 2);
602
Vector128.Store(acc4, accumulators + Vector128<ulong>.
Count
* 3);
647
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
652
accumulators += Vector128<ulong>.
Count
;
653
secret += Vector128<byte>.
Count
;
654
source += Vector128<byte>.
Count
;
740
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
745
accumulators += Vector128<ulong>.
Count
;
746
secret += Vector128<byte>.
Count
;
Microsoft.CodeAnalysis (24)
Hashing\XxHashShared.cs (24)
503
for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.
Count
)
562
Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.
Count
);
563
Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 2);
564
Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 3);
573
source += Vector128<byte>.
Count
;
575
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
);
577
source += Vector128<byte>.
Count
;
579
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 2);
581
source += Vector128<byte>.
Count
;
583
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 3);
585
source += Vector128<byte>.
Count
;
593
acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
));
594
acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 2));
595
acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 3));
600
Vector128.Store(acc2, accumulators + Vector128<ulong>.
Count
);
601
Vector128.Store(acc3, accumulators + Vector128<ulong>.
Count
* 2);
602
Vector128.Store(acc4, accumulators + Vector128<ulong>.
Count
* 3);
647
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
652
accumulators += Vector128<ulong>.
Count
;
653
secret += Vector128<byte>.
Count
;
654
source += Vector128<byte>.
Count
;
740
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
745
accumulators += Vector128<ulong>.
Count
;
746
secret += Vector128<byte>.
Count
;
Microsoft.CodeAnalysis.Workspaces (24)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (24)
503
for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.
Count
)
562
Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.
Count
);
563
Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 2);
564
Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 3);
573
source += Vector128<byte>.
Count
;
575
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
);
577
source += Vector128<byte>.
Count
;
579
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 2);
581
source += Vector128<byte>.
Count
;
583
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 3);
585
source += Vector128<byte>.
Count
;
593
acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
));
594
acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 2));
595
acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 3));
600
Vector128.Store(acc2, accumulators + Vector128<ulong>.
Count
);
601
Vector128.Store(acc3, accumulators + Vector128<ulong>.
Count
* 2);
602
Vector128.Store(acc4, accumulators + Vector128<ulong>.
Count
* 3);
647
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
652
accumulators += Vector128<ulong>.
Count
;
653
secret += Vector128<byte>.
Count
;
654
source += Vector128<byte>.
Count
;
740
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
745
accumulators += Vector128<ulong>.
Count
;
746
secret += Vector128<byte>.
Count
;
System.IO.Hashing (48)
System\IO\Hashing\Crc32.Vectorized.cs (12)
23
&& source.Length >= Vector128<byte>.
Count
* (System.Runtime.Intrinsics.Arm.Crc32.IsSupported ? 8 : 1);
49
if (length >= Vector128<byte>.
Count
* 8)
56
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
* 4);
57
length -= Vector128<byte>.
Count
* 4;
77
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
* 4);
78
length -= Vector128<byte>.
Count
* 4;
79
} while (length >= Vector128<byte>.
Count
* 4);
95
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
);
96
length -= Vector128<byte>.
Count
;
100
while (length >= Vector128<byte>.
Count
)
105
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
);
106
length -= Vector128<byte>.
Count
;
System\IO\Hashing\Crc64.Vectorized.cs (12)
37
private static bool CanBeVectorized(ReadOnlySpan<byte> source) => VectorHelper.IsSupported && source.Length >= Vector128<byte>.
Count
;
62
if (length >= Vector128<byte>.
Count
* 16) // At least 256 bytes
74
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
* 8);
75
length -= Vector128<byte>.
Count
* 8;
107
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
* 8);
108
length -= Vector128<byte>.
Count
* 8;
109
} while (length >= Vector128<byte>.
Count
* 8);
132
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
);
133
length -= Vector128<byte>.
Count
;
137
while (length >= Vector128<byte>.
Count
)
142
srcRef = ref Unsafe.Add(ref srcRef, Vector128<byte>.
Count
);
143
length -= Vector128<byte>.
Count
;
System\IO\Hashing\XxHashShared.cs (24)
494
for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.
Count
)
553
Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.
Count
);
554
Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 2);
555
Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 3);
564
source += Vector128<byte>.
Count
;
566
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
);
568
source += Vector128<byte>.
Count
;
570
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 2);
572
source += Vector128<byte>.
Count
;
574
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 3);
576
source += Vector128<byte>.
Count
;
584
acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
));
585
acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 2));
586
acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 3));
591
Vector128.Store(acc2, accumulators + Vector128<ulong>.
Count
);
592
Vector128.Store(acc3, accumulators + Vector128<ulong>.
Count
* 2);
593
Vector128.Store(acc4, accumulators + Vector128<ulong>.
Count
* 3);
638
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
643
accumulators += Vector128<ulong>.
Count
;
644
secret += Vector128<byte>.
Count
;
645
source += Vector128<byte>.
Count
;
731
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
736
accumulators += Vector128<ulong>.
Count
;
737
secret += Vector128<byte>.
Count
;
System.Linq (5)
System\Linq\MaxMin.cs (5)
40
if (!Vector128.IsHardwareAccelerated || !Vector128<T>.IsSupported || span.Length < Vector128<T>.
Count
)
54
ref T lastVectorStart = ref Unsafe.Add(ref current, span.Length - Vector128<T>.
Count
);
57
current = ref Unsafe.Add(ref current, Vector128<T>.
Count
);
62
current = ref Unsafe.Add(ref current, Vector128<T>.
Count
);
67
for (int i = 1; i < Vector128<T>.
Count
; i++)
System.Numerics.Tensors (767)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (83)
116
if (remainder >= (uint)Vector128<T>.
Count
)
157
Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
161
if (remainder > (uint)(Vector128<T>.
Count
* 8))
200
misalignment = (uint)Vector128<T>.
Count
;
212
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
216
vector1 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)));
217
vector2 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)));
218
vector3 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)));
219
vector4 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)));
228
vector1 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)));
229
vector2 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)));
230
vector3 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)));
231
vector4 = transform.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)));
241
xPtr += (uint)(Vector128<T>.
Count
* 8);
243
remainder -= (uint)(Vector128<T>.
Count
* 8);
264
(nuint blocks, nuint trailing) = Math.DivRem(remainder, (nuint)Vector128<T>.
Count
);
272
Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7)));
279
Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6)));
286
Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5)));
293
Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4)));
300
Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3)));
307
Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2)));
314
Vector128<T> vector = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 1)));
800
Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
802
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
947
Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
949
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
1047
Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
1049
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
1130
Vector128<T> end = transform.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
1132
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
1235
if (remainder >= (uint)Vector128<T>.
Count
)
1278
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1279
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
1283
if (remainder > (uint)(Vector128<T>.
Count
* 8))
1326
misalignment = (uint)Vector128<T>.
Count
;
1341
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
1345
vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
1346
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 0)));
1347
vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
1348
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 1)));
1349
vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
1350
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 2)));
1351
vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
1352
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 3)));
1361
vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
1362
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 4)));
1363
vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
1364
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 5)));
1365
vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
1366
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 6)));
1367
vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
1368
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 7)));
1378
xPtr += (uint)(Vector128<T>.
Count
* 8);
1379
yPtr += (uint)(Vector128<T>.
Count
* 8);
1381
remainder -= (uint)(Vector128<T>.
Count
* 8);
1403
(nuint blocks, nuint trailing) = Math.DivRem(remainder, (nuint)Vector128<T>.
Count
);
1411
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7)),
1412
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 7)));
1419
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6)),
1420
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 6)));
1427
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5)),
1428
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 5)));
1435
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4)),
1436
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 4)));
1443
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3)),
1444
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 3)));
1451
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2)),
1452
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 2)));
1459
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 1)),
1460
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 1)));
2000
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2001
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
2003
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
2153
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2154
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
2156
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
2259
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2260
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
2262
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
2350
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2351
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
2353
end = Vector128.ConditionalSelect(CreateRemainderMaskVector128<T>((int)(remainder % (uint)Vector128<T>.
Count
)), end, Vector128.Create(TAggregationOperator.IdentityValue));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (168)
123
if (remainder >= (uint)Vector128<T>.
Count
)
162
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
163
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
165
if (remainder > (uint)(Vector128<T>.
Count
* 8))
213
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
217
vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
218
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 0)));
219
vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
220
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 1)));
221
vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
222
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 2)));
223
vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
224
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 3)));
226
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 0));
227
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 1));
228
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 2));
229
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 3));
233
vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
234
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 4)));
235
vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
236
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 5)));
237
vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
238
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 6)));
239
vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
240
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 7)));
242
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 4));
243
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 5));
244
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 6));
245
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 7));
250
xPtr += (uint)(Vector128<T>.
Count
* 8);
251
yPtr += (uint)(Vector128<T>.
Count
* 8);
252
dPtr += (uint)(Vector128<T>.
Count
* 8);
254
remainder -= (uint)(Vector128<T>.
Count
* 8);
259
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
263
vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
264
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 0)));
265
vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
266
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 1)));
267
vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
268
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 2)));
269
vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
270
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 3)));
272
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 0));
273
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 1));
274
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 2));
275
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 3));
279
vector1 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
280
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 4)));
281
vector2 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
282
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 5)));
283
vector3 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
284
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 6)));
285
vector4 = TBinaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
286
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 7)));
288
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 4));
289
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 5));
290
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 6));
291
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 7));
296
xPtr += (uint)(Vector128<T>.
Count
* 8);
297
yPtr += (uint)(Vector128<T>.
Count
* 8);
298
dPtr += (uint)(Vector128<T>.
Count
* 8);
300
remainder -= (uint)(Vector128<T>.
Count
* 8);
320
remainder = (remainder + (uint)(Vector128<T>.
Count
- 1)) & (nuint)(-Vector128<T>.
Count
);
322
switch (remainder / (uint)Vector128<T>.
Count
)
326
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 8)),
327
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 8)));
328
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 8));
334
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7)),
335
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 7)));
336
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 7));
342
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6)),
343
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 6)));
344
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 6));
350
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5)),
351
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 5)));
352
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 5));
358
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4)),
359
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 4)));
360
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 4));
366
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3)),
367
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 3)));
368
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 3));
374
Vector128<T> vector = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2)),
375
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 2)));
376
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 2));
383
end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.
Count
);
988
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
989
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
992
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1152
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1153
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
1156
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1261
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1262
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
1265
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1349
Vector128<T> end = TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1350
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
));
1353
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1455
if (remainder >= (uint)Vector128<T>.
Count
)
1496
Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
)),
1499
if (remainder > (uint)(Vector128<T>.
Count
* 8))
1544
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
1548
vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0))),
1550
vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1))),
1552
vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2))),
1554
vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3))),
1557
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 0));
1558
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 1));
1559
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 2));
1560
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 3));
1564
vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4))),
1566
vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5))),
1568
vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6))),
1570
vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7))),
1573
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 4));
1574
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 5));
1575
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 6));
1576
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 7));
1581
xPtr += (uint)(Vector128<T>.
Count
* 8);
1582
dPtr += (uint)(Vector128<T>.
Count
* 8);
1584
remainder -= (uint)(Vector128<T>.
Count
* 8);
1589
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
1593
vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0))),
1595
vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1))),
1597
vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2))),
1599
vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3))),
1602
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 0));
1603
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 1));
1604
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 2));
1605
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 3));
1609
vector1 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4))),
1611
vector2 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5))),
1613
vector3 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6))),
1615
vector4 = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7))),
1618
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 4));
1619
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 5));
1620
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 6));
1621
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 7));
1626
xPtr += (uint)(Vector128<T>.
Count
* 8);
1627
dPtr += (uint)(Vector128<T>.
Count
* 8);
1629
remainder -= (uint)(Vector128<T>.
Count
* 8);
1648
remainder = (remainder + (uint)(Vector128<T>.
Count
- 1)) & (nuint)(-Vector128<T>.
Count
);
1650
switch (remainder / (uint)Vector128<T>.
Count
)
1654
Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 8))),
1656
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 8));
1662
Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7))),
1664
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 7));
1670
Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6))),
1672
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 6));
1678
Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5))),
1680
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 5));
1686
Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4))),
1688
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 4));
1694
Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3))),
1696
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 3));
1702
Vector128<T> vector = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2))),
1704
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 2));
1711
end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.
Count
);
2312
Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
)),
2316
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
2480
Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
)),
2484
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
2593
Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
)),
2597
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
2685
Vector128<T> end = TBinaryOperator.Invoke(TTransformOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
)),
2689
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (26)
158
oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
169
i += Vector128<T>.
Count
;
175
TAnyAll.ShouldEarlyExit(TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.
Count
)))))
298
int vectorFromEnd = x.Length - Vector128<T>.
Count
;
305
i += Vector128<T>.
Count
;
312
i = x.Length - Vector128<T>.
Count
;
412
int vectorsFromEnd = x.Length - (Vector128<T>.
Count
* sizeof(T));
419
i += Vector128<T>.
Count
* sizeof(T);
426
i = x.Length - (Vector128<T>.
Count
* sizeof(T));
437
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.
Count
))).AsUInt16());
537
int vectorsFromEnd = x.Length - (Vector128<T>.
Count
* sizeof(T));
544
i += Vector128<T>.
Count
* sizeof(T);
551
i = x.Length - (Vector128<T>.
Count
* sizeof(T));
563
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.
Count
))).AsUInt32()),
565
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.
Count
)))).AsUInt32(),
566
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.
Count
)))).AsUInt32()));
686
int vectorsFromEnd = x.Length - (Vector128<T>.
Count
* sizeof(T));
693
i += Vector128<T>.
Count
* sizeof(T);
700
i = x.Length - (Vector128<T>.
Count
* sizeof(T));
713
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.
Count
))).AsUInt64()),
715
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (2 * Vector128<T>.
Count
)))).AsUInt64(),
716
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (3 * Vector128<T>.
Count
)))).AsUInt64())),
719
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (4 * Vector128<T>.
Count
)))).AsUInt64(),
720
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (5 * Vector128<T>.
Count
)))).AsUInt64()),
722
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (6 * Vector128<T>.
Count
)))).AsUInt64(),
723
TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + (7 * Vector128<T>.
Count
)))).AsUInt64())));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs (69)
89
if (remainder >= (uint)Vector128<T>.
Count
)
126
Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
128
if (remainder > (uint)(Vector128<T>.
Count
* 8))
173
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
177
vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)));
178
vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)));
179
vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)));
180
vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)));
182
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 0));
183
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 1));
184
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 2));
185
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 3));
189
vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)));
190
vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)));
191
vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)));
192
vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)));
194
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 4));
195
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 5));
196
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 6));
197
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 7));
202
xPtr += (uint)(Vector128<T>.
Count
* 8);
203
dPtr += (uint)(Vector128<T>.
Count
* 8);
205
remainder -= (uint)(Vector128<T>.
Count
* 8);
210
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
214
vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)));
215
vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)));
216
vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)));
217
vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)));
219
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 0));
220
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 1));
221
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 2));
222
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 3));
226
vector1 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)));
227
vector2 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)));
228
vector3 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)));
229
vector4 = op.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)));
231
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 4));
232
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 5));
233
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 6));
234
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 7));
239
xPtr += (uint)(Vector128<T>.
Count
* 8);
240
dPtr += (uint)(Vector128<T>.
Count
* 8);
242
remainder -= (uint)(Vector128<T>.
Count
* 8);
261
remainder = (remainder + (uint)(Vector128<T>.
Count
- 1)) & (nuint)(-Vector128<T>.
Count
);
263
switch (remainder / (uint)Vector128<T>.
Count
)
267
Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 8)));
268
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 8));
274
Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7)));
275
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 7));
281
Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6)));
282
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 6));
288
Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5)));
289
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 5));
295
Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4)));
296
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 4));
302
Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3)));
303
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 3));
309
Vector128<T> vector = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2)));
310
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 2));
317
end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.
Count
);
856
Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
859
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1000
Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
1003
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1097
Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
1100
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1177
Vector128<T> end = op.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
));
1180
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (297)
110
if (remainder >= (uint)Vector128<T>.
Count
)
151
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
152
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
153
Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.
Count
));
155
if (remainder > (uint)(Vector128<T>.
Count
* 8))
206
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
210
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
211
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 0)),
212
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 0)));
213
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
214
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 1)),
215
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 1)));
216
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
217
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 2)),
218
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 2)));
219
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
220
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 3)),
221
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 3)));
223
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 0));
224
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 1));
225
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 2));
226
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 3));
230
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
231
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 4)),
232
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 4)));
233
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
234
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 5)),
235
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 5)));
236
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
237
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 6)),
238
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 6)));
239
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
240
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 7)),
241
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 7)));
243
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 4));
244
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 5));
245
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 6));
246
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 7));
251
xPtr += (uint)(Vector128<T>.
Count
* 8);
252
yPtr += (uint)(Vector128<T>.
Count
* 8);
253
zPtr += (uint)(Vector128<T>.
Count
* 8);
254
dPtr += (uint)(Vector128<T>.
Count
* 8);
256
remainder -= (uint)(Vector128<T>.
Count
* 8);
261
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
265
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
266
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 0)),
267
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 0)));
268
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
269
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 1)),
270
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 1)));
271
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
272
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 2)),
273
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 2)));
274
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
275
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 3)),
276
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 3)));
278
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 0));
279
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 1));
280
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 2));
281
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 3));
285
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
286
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 4)),
287
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 4)));
288
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
289
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 5)),
290
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 5)));
291
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
292
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 6)),
293
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 6)));
294
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
295
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 7)),
296
Vector128.Load(zPtr + (uint)(Vector128<T>.
Count
* 7)));
298
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 4));
299
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 5));
300
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 6));
301
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 7));
306
xPtr += (uint)(Vector128<T>.
Count
* 8);
307
yPtr += (uint)(Vector128<T>.
Count
* 8);
308
zPtr += (uint)(Vector128<T>.
Count
* 8);
309
dPtr += (uint)(Vector128<T>.
Count
* 8);
311
remainder -= (uint)(Vector128<T>.
Count
* 8);
332
remainder = (remainder + (uint)(Vector128<T>.
Count
- 1)) & (nuint)(-Vector128<T>.
Count
);
334
switch (remainder / (uint)Vector128<T>.
Count
)
338
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 8)),
339
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 8)),
340
Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.
Count
* 8)));
341
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 8));
347
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7)),
348
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 7)),
349
Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.
Count
* 7)));
350
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 7));
356
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6)),
357
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 6)),
358
Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.
Count
* 6)));
359
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 6));
365
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5)),
366
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 5)),
367
Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.
Count
* 5)));
368
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 5));
374
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4)),
375
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 4)),
376
Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.
Count
* 4)));
377
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 4));
383
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3)),
384
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 3)),
385
Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.
Count
* 3)));
386
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 3));
392
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2)),
393
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 2)),
394
Vector128.LoadUnsafe(ref zRef, remainder - (uint)(Vector128<T>.
Count
* 2)));
395
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 2));
402
end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.
Count
);
1073
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1074
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
1075
Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.
Count
));
1078
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1257
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1258
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
1259
Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.
Count
));
1262
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1378
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1379
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
1380
Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.
Count
));
1383
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1474
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1475
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
1476
Vector128.LoadUnsafe(ref zRef, remainder - (uint)Vector128<T>.
Count
));
1479
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
1585
if (remainder >= (uint)Vector128<T>.
Count
)
1628
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
1629
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
1632
if (remainder > (uint)(Vector128<T>.
Count
* 8))
1680
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
1684
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
1685
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 0)),
1687
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
1688
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 1)),
1690
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
1691
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 2)),
1693
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
1694
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 3)),
1697
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 0));
1698
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 1));
1699
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 2));
1700
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 3));
1704
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
1705
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 4)),
1707
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
1708
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 5)),
1710
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
1711
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 6)),
1713
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
1714
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 7)),
1717
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 4));
1718
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 5));
1719
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 6));
1720
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 7));
1725
xPtr += (uint)(Vector128<T>.
Count
* 8);
1726
yPtr += (uint)(Vector128<T>.
Count
* 8);
1727
dPtr += (uint)(Vector128<T>.
Count
* 8);
1729
remainder -= (uint)(Vector128<T>.
Count
* 8);
1734
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
1738
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
1739
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 0)),
1741
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
1742
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 1)),
1744
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
1745
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 2)),
1747
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
1748
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 3)),
1751
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 0));
1752
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 1));
1753
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 2));
1754
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 3));
1758
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
1759
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 4)),
1761
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
1762
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 5)),
1764
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
1765
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 6)),
1767
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
1768
Vector128.Load(yPtr + (uint)(Vector128<T>.
Count
* 7)),
1771
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 4));
1772
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 5));
1773
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 6));
1774
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 7));
1779
xPtr += (uint)(Vector128<T>.
Count
* 8);
1780
yPtr += (uint)(Vector128<T>.
Count
* 8);
1781
dPtr += (uint)(Vector128<T>.
Count
* 8);
1783
remainder -= (uint)(Vector128<T>.
Count
* 8);
1803
remainder = (remainder + (uint)(Vector128<T>.
Count
- 1)) & (nuint)(-Vector128<T>.
Count
);
1805
switch (remainder / (uint)Vector128<T>.
Count
)
1809
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 8)),
1810
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 8)),
1812
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 8));
1818
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7)),
1819
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 7)),
1821
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 7));
1827
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6)),
1828
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 6)),
1830
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 6));
1836
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5)),
1837
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 5)),
1839
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 5));
1845
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4)),
1846
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 4)),
1848
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 4));
1854
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3)),
1855
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 3)),
1857
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 3));
1863
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2)),
1864
Vector128.LoadUnsafe(ref yRef, remainder - (uint)(Vector128<T>.
Count
* 2)),
1866
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 2));
1873
end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.
Count
);
2540
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2541
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
2545
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
2728
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2729
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
2733
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
2853
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2854
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
2858
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
2953
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
2954
Vector128.LoadUnsafe(ref yRef, remainder - (uint)Vector128<T>.
Count
),
2958
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
3071
if (remainder >= (uint)Vector128<T>.
Count
)
3115
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
3119
if (remainder > (uint)(Vector128<T>.
Count
* 8))
3164
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
3168
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
3171
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
3174
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
3177
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
3181
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 0));
3182
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 1));
3183
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 2));
3184
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 3));
3188
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
3191
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
3194
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
3197
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
3201
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 4));
3202
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 5));
3203
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 6));
3204
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<T>.
Count
* 7));
3209
xPtr += (uint)(Vector128<T>.
Count
* 8);
3210
dPtr += (uint)(Vector128<T>.
Count
* 8);
3212
remainder -= (uint)(Vector128<T>.
Count
* 8);
3217
while (remainder >= (uint)(Vector128<T>.
Count
* 8))
3221
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 0)),
3224
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 1)),
3227
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 2)),
3230
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 3)),
3234
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 0));
3235
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 1));
3236
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 2));
3237
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 3));
3241
vector1 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 4)),
3244
vector2 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 5)),
3247
vector3 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 6)),
3250
vector4 = TTernaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<T>.
Count
* 7)),
3254
vector1.Store(dPtr + (uint)(Vector128<T>.
Count
* 4));
3255
vector2.Store(dPtr + (uint)(Vector128<T>.
Count
* 5));
3256
vector3.Store(dPtr + (uint)(Vector128<T>.
Count
* 6));
3257
vector4.Store(dPtr + (uint)(Vector128<T>.
Count
* 7));
3262
xPtr += (uint)(Vector128<T>.
Count
* 8);
3263
dPtr += (uint)(Vector128<T>.
Count
* 8);
3265
remainder -= (uint)(Vector128<T>.
Count
* 8);
3284
remainder = (remainder + (uint)(Vector128<T>.
Count
- 1)) & (nuint)(-Vector128<T>.
Count
);
3286
switch (remainder / (uint)Vector128<T>.
Count
)
3290
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 8)),
3293
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 8));
3299
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 7)),
3302
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 7));
3308
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 6)),
3311
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 6));
3317
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 5)),
3320
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 5));
3326
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 4)),
3329
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 4));
3335
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 3)),
3338
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 3));
3344
Vector128<T> vector = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<T>.
Count
* 2)),
3347
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<T>.
Count
* 2));
3354
end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<T>.
Count
);
4013
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
4018
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
4203
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
4208
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
4330
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
4335
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
4432
Vector128<T> end = TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<T>.
Count
),
4437
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<T>.
Count
);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs (9)
132
oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
142
i += Vector128<T>.
Count
;
149
i = x.Length - Vector128<T>.
Count
;
303
oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
313
i += Vector128<T>.
Count
;
322
i = x.Length - Vector128<T>.
Count
;
488
oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
500
i += Vector128<T>.
Count
;
509
i = x.Length - Vector128<T>.
Count
;
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToFourOperator.cs (9)
123
oneVectorFromEnd = x.Length - Vector128<TInput>.
Count
;
131
results.Item2.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.
Count
));
132
results.Item3.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.
Count
* 2)));
133
results.Item4.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.
Count
* 3)));
135
i += Vector128<TInput>.
Count
;
142
i = x.Length - Vector128<TInput>.
Count
;
146
results.Item2.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.
Count
));
147
results.Item3.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.
Count
* 2)));
148
results.Item4.StoreUnsafe(ref destinationRef, (uint)(i + (Vector128<TOutput>.
Count
* 3)));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs (5)
115
oneVectorFromEnd = x.Length - Vector128<TInput>.
Count
;
123
upper.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.
Count
));
125
i += Vector128<TInput>.
Count
;
132
i = x.Length - Vector128<TInput>.
Count
;
136
upper.StoreUnsafe(ref destinationRef, (uint)(i + Vector128<TOutput>.
Count
));
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs (69)
129
if (remainder >= (uint)Vector128<TInput>.
Count
)
166
Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.
Count
));
168
if (remainder > (uint)(Vector128<TInput>.
Count
* 8))
213
while (remainder >= (uint)(Vector128<TInput>.
Count
* 8))
217
vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 0)));
218
vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 1)));
219
vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 2)));
220
vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 3)));
222
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 0));
223
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 1));
224
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 2));
225
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 3));
229
vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 4)));
230
vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 5)));
231
vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 6)));
232
vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 7)));
234
vector1.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 4));
235
vector2.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 5));
236
vector3.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 6));
237
vector4.StoreAlignedNonTemporal(dPtr + (uint)(Vector128<TOutput>.
Count
* 7));
242
xPtr += (uint)(Vector128<TInput>.
Count
* 8);
243
dPtr += (uint)(Vector128<TOutput>.
Count
* 8);
245
remainder -= (uint)(Vector128<TInput>.
Count
* 8);
250
while (remainder >= (uint)(Vector128<TInput>.
Count
* 8))
254
vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 0)));
255
vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 1)));
256
vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 2)));
257
vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 3)));
259
vector1.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 0));
260
vector2.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 1));
261
vector3.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 2));
262
vector4.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 3));
266
vector1 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 4)));
267
vector2 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 5)));
268
vector3 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 6)));
269
vector4 = TUnaryOperator.Invoke(Vector128.Load(xPtr + (uint)(Vector128<TInput>.
Count
* 7)));
271
vector1.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 4));
272
vector2.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 5));
273
vector3.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 6));
274
vector4.Store(dPtr + (uint)(Vector128<TOutput>.
Count
* 7));
279
xPtr += (uint)(Vector128<TInput>.
Count
* 8);
280
dPtr += (uint)(Vector128<TOutput>.
Count
* 8);
282
remainder -= (uint)(Vector128<TInput>.
Count
* 8);
301
remainder = (remainder + (uint)(Vector128<TInput>.
Count
- 1)) & (nuint)(-Vector128<TInput>.
Count
);
303
switch (remainder / (uint)Vector128<TInput>.
Count
)
307
Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.
Count
* 8)));
308
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.
Count
* 8));
314
Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.
Count
* 7)));
315
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.
Count
* 7));
321
Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.
Count
* 6)));
322
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.
Count
* 6));
328
Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.
Count
* 5)));
329
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.
Count
* 5));
335
Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.
Count
* 4)));
336
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.
Count
* 4));
342
Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.
Count
* 3)));
343
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.
Count
* 3));
349
Vector128<TOutput> vector = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)(Vector128<TInput>.
Count
* 2)));
350
vector.StoreUnsafe(ref dRef, remainder - (uint)(Vector128<TOutput>.
Count
* 2));
357
end.StoreUnsafe(ref dRef, endIndex - (uint)Vector128<TInput>.
Count
);
896
Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.
Count
));
899
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.
Count
);
1040
Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.
Count
));
1043
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.
Count
);
1137
Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.
Count
));
1140
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.
Count
);
1217
Vector128<TOutput> end = TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, remainder - (uint)Vector128<TInput>.
Count
));
1220
end.StoreUnsafe(ref dRef, remainder - (uint)Vector128<TOutput>.
Count
);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs (5)
115
twoVectorsFromEnd = x.Length - (Vector128<TInput>.
Count
* 2);
123
Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<TInput>.
Count
))).StoreUnsafe(ref destinationRef, (uint)i);
125
i += Vector128<TInput>.
Count
* 2;
132
i = x.Length - (Vector128<TInput>.
Count
* 2);
136
Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<TInput>.
Count
))).StoreUnsafe(ref destinationRef, (uint)i);
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (10)
135
if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.
Count
)
145
int oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
154
i += Vector128<T>.
Count
;
164
Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.
Count
)) & remainderMask,
165
Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<T>.
Count
)) & remainderMask,
285
if (Vector128.IsHardwareAccelerated && x.Length >= Vector128<short>.
Count
)
296
int oneVectorFromEnd = x.Length - Vector128<short>.
Count
;
306
i += Vector128<short>.
Count
;
316
Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<short>.
Count
)) & remainderMask);
318
Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<short>.
Count
)) & remainderMask);
System\Numerics\Tensors\netcore\TensorPrimitives.Half.cs (1)
307
source.Length >= Vector128<short>.
Count
;
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (5)
75
if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.
Count
)
149
int oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
158
i += Vector128<T>.
Count
;
165
Vector128<T> xVec = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.
Count
));
166
Vector128<T> yVec = Vector128.LoadUnsafe(ref yRef, (uint)(x.Length - Vector128<T>.
Count
));
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (6)
330
if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.
Count
)
355
Vector128<T> increment = CreateVector128T(Vector128<T>.
Count
);
372
int oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
373
int i = Vector128<T>.
Count
;
393
i += Vector128<T>.
Count
;
399
current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.
Count
));
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (5)
538
if (Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported && x.Length >= Vector128<T>.
Count
)
558
int oneVectorFromEnd = x.Length - Vector128<T>.
Count
;
559
int i = Vector128<T>.
Count
;
578
i += Vector128<T>.
Count
;
584
current = Vector128.LoadUnsafe(ref xRef, (uint)(x.Length - Vector128<T>.
Count
));
System.Private.CoreLib (402)
src\libraries\Common\src\System\HexConverter.cs (10)
120
Debug.Assert(source.Length >= (Vector128<TChar>.
Count
/ 2));
136
nuint lengthSubVector128 = (nuint)source.Length - (nuint)(Vector128<TChar>.
Count
/ 2);
169
pos += (nuint)(Vector128<TChar>.
Count
/ 2);
190
if ((AdvSimd.Arm64.IsSupported || Ssse3.IsSupported) && (source.Length >= (Vector128<byte>.
Count
/ 2)))
207
if ((AdvSimd.Arm64.IsSupported || Ssse3.IsSupported) && (source.Length >= (Vector128<ushort>.
Count
/ 2)))
285
(utf8Source.Length >= Vector128<byte>.
Count
))
297
(source.Length >= (Vector128<ushort>.
Count
* 2)))
319
elementsReadPerIteration = Vector128<byte>.
Count
;
324
elementsReadPerIteration = Vector128<ushort>.
Count
* 2;
355
Vector128<ushort> vec2 = Vector128.LoadUnsafe(ref srcRef, offset + (nuint)Vector128<ushort>.
Count
).AsUInt16();
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (4)
319
while (i <= source.Length - Vector128<T>.
Count
)
322
i += Vector128<T>.
Count
;
351
while (i >= Vector128<T>.
Count
)
353
i -= Vector128<T>.
Count
;
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (1)
405
utf16HighVector.Store(dest + Vector128<ushort>.
Count
);
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (13)
196
for (; i <= (uint)values.Length - Vector128<byte>.
Count
* 2u; i += (uint)Vector128<byte>.
Count
* 2u)
202
Vector128<byte> upperVector = Vector128.LoadUnsafe(ref value, i + (uint)Vector128<byte>.
Count
);
788
else if (Ssse3.IsSupported && ((uint)_bitLength >= Vector128<byte>.
Count
* 2u))
797
for (; (i + Vector128<byte>.
Count
* 2u) <= (uint)_bitLength; i += (uint)Vector128<byte>.
Count
* 2u)
810
Sse2.Store((byte*)destination + i + Vector128<byte>.
Count
, normalizedHigher);
814
else if (PackedSimd.IsSupported && ((uint)_bitLength >= Vector128<byte>.
Count
* 2u))
823
for (; (i + Vector128<byte>.
Count
* 2u) <= (uint)_bitLength; i += (uint)Vector128<byte>.
Count
* 2u)
836
PackedSimd.Store((byte*)destination + i + Vector128<byte>.
Count
, normalizedHigher);
847
for (; (i + Vector128<byte>.
Count
* 2u) <= (uint)_bitLength; i += (uint)Vector128<byte>.
Count
* 2u)
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (5)
162
if (!Vector128.IsHardwareAccelerated || length < Vector128<ushort>.
Count
)
375
searchSpaceMinusValueTailLength >= Vector128<ushort>.
Count
)
527
nint searchSpaceMinusValueTailLengthAndVector = searchSpaceMinusValueTailLength - (nint)Vector128<ushort>.
Count
;
531
Debug.Assert(offset + ch1ch2Distance + Vector128<ushort>.
Count
<= source.Length);
546
offset += Vector128<ushort>.
Count
;
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (12)
107
Debug.Assert(lengthA >= Vector128<byte>.
Count
);
108
Debug.Assert(lengthB >= Vector128<byte>.
Count
);
112
nuint lengthToExamine = lengthU - (nuint)Vector128<byte>.
Count
;
134
i += (nuint)Vector128<byte>.
Count
;
164
if (!Vector128.IsHardwareAccelerated || (lengthA < Vector128<byte>.
Count
) || (lengthB < Vector128<byte>.
Count
))
417
Debug.Assert(sourceLength >= Vector128<byte>.
Count
);
418
Debug.Assert(prefixLength >= Vector128<byte>.
Count
);
422
nuint lengthToExamine = lengthU - (nuint)Vector128<byte>.
Count
;
444
i += (nuint)Vector128<byte>.
Count
;
474
if (!Vector128.IsHardwareAccelerated || (sourceLength < Vector128<byte>.
Count
) || (prefixLength < Vector128<byte>.
Count
))
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (9)
484
Debug.Assert(Vector<double>.Count == Vector128<double>.
Count
);
507
Debug.Assert(Vector<double>.Count == Vector128<double>.
Count
);
615
Debug.Assert(Vector<float>.Count == Vector128<float>.
Count
);
782
Debug.Assert(Vector<T>.Count == Vector128<T>.
Count
);
828
/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.
Count
" />.</exception>
1439
Debug.Assert(Vector<T>.Count == Vector128<T>.
Count
);
1685
Debug.Assert(Vector<T>.Count == Vector128<T>.
Count
);
2736
Debug.Assert(Vector<uint>.Count == Vector128<uint>.
Count
);
2762
Debug.Assert(Vector<ulong>.Count == Vector128<ulong>.
Count
);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (50)
653
for (int i = 0; i < Vector128<float>.
Count
; i++)
749
/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.
Count
" />.</exception>
757
if (destination.Length < Vector128<T>.
Count
)
770
/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.
Count
" />.</exception>
784
if ((destination.Length - startIndex) < Vector128<T>.
Count
)
796
/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.
Count
" />.</exception>
801
if (destination.Length < Vector128<T>.
Count
)
976
/// <returns>A new <see cref="Vector128{T}" /> with its elements set to the first <see cref="Vector128{T}.
Count
" /> elements from <paramref name="values" />.</returns>
977
/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.
Count
" />.</exception>
985
if (values.Length < Vector128<T>.
Count
)
997
/// <returns>A new <see cref="Vector128{T}" /> with its elements set to the first <see cref="Vector128{T}.
Count
" /> elements from <paramref name="values" />.</returns>
998
/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" />, starting from <paramref name="index" />, is less than <see cref="Vector128{T}.
Count
" />.</exception>
1006
if ((index < 0) || ((values.Length - index) < Vector128<T>.
Count
))
1017
/// <returns>A new <see cref="Vector128{T}" /> with its elements set to the first <see cref="Vector128{T}.
Count
" /> elements from <paramref name="values" />.</returns>
1018
/// <exception cref="ArgumentOutOfRangeException">The length of <paramref name="values" /> is less than <see cref="Vector128{T}.
Count
" />.</exception>
1023
if (values.Length < Vector128<T>.
Count
)
1769
if ((uint)(index) >= (uint)(Vector128<T>.
Count
))
2708
for (int i = 0; i < Vector128<TSource>.
Count
; i++)
2714
for (int i = Vector128<TSource>.
Count
; i < Vector128<TResult>.
Count
; i++)
2716
TResult value = TResult.CreateTruncating(upper.GetElementUnsafe(i - Vector128<TSource>.
Count
));
2805
for (int i = 0; i < Vector128<TSource>.
Count
; i++)
2811
for (int i = Vector128<TSource>.
Count
; i < Vector128<TResult>.
Count
; i++)
2813
TResult value = TResult.CreateSaturating(upper.GetElementUnsafe(i - Vector128<TSource>.
Count
));
3325
for (int index = 0; index < Vector128<byte>.
Count
; index++)
3330
if (selectedIndex < Vector128<byte>.
Count
)
3370
for (int index = 0; index < Vector128<sbyte>.
Count
; index++)
3375
if (selectedIndex < Vector128<sbyte>.
Count
)
3447
for (int index = 0; index < Vector128<short>.
Count
; index++)
3452
if (selectedIndex < Vector128<short>.
Count
)
3472
for (int index = 0; index < Vector128<ushort>.
Count
; index++)
3477
if (selectedIndex < Vector128<ushort>.
Count
)
3535
for (int index = 0; index < Vector128<int>.
Count
; index++)
3540
if (selectedIndex < Vector128<int>.
Count
)
3560
for (int index = 0; index < Vector128<uint>.
Count
; index++)
3565
if (selectedIndex < Vector128<uint>.
Count
)
3584
for (int index = 0; index < Vector128<float>.
Count
; index++)
3589
if (selectedIndex < Vector128<float>.
Count
)
3666
for (int index = 0; index < Vector128<long>.
Count
; index++)
3671
if (selectedIndex < (uint)Vector128<long>.
Count
)
3691
for (int index = 0; index < Vector128<ulong>.
Count
; index++)
3696
if (selectedIndex < (uint)Vector128<ulong>.
Count
)
3715
for (int index = 0; index < Vector128<double>.
Count
; index++)
3720
if (selectedIndex < (uint)Vector128<double>.
Count
)
4111
/// <returns><c>true</c> if <paramref name="vector" /> was successfully copied to <paramref name="destination" />; otherwise, <c>false</c> if the length of <paramref name="destination" /> is less than <see cref="Vector128{T}.
Count
" />.</returns>
4116
if (destination.Length < Vector128<T>.
Count
)
4401
if ((uint)(index) >= (uint)(Vector128<T>.
Count
))
4457
Debug.Assert((index >= 0) && (index < Vector128<T>.
Count
));
4465
Debug.Assert((index >= 0) && (index < Vector128<T>.
Count
));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.Numerics.cs (2)
103
Debug.Assert(Vector<T>.Count >= Vector128<T>.
Count
);
175
Debug.Assert(Vector<T>.Count >= Vector128<T>.
Count
);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128_1.cs (4)
68
for (int i = 0; i <
Count
; i++)
432
for (int i = 0; i <
Count
; i++)
456
for (int i = 1; i <
Count
; i++)
475
static int ISimdVector<Vector128<T>, T>.ElementCount => Vector128<T>.
Count
;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128DebugView_1.cs (12)
21
var items = new byte[Vector128<byte>.
Count
];
31
var items = new double[Vector128<double>.
Count
];
41
var items = new short[Vector128<short>.
Count
];
51
var items = new int[Vector128<int>.
Count
];
61
var items = new long[Vector128<long>.
Count
];
71
var items = new nint[Vector128<nint>.
Count
];
81
var items = new nuint[Vector128<nuint>.
Count
];
91
var items = new sbyte[Vector128<sbyte>.
Count
];
101
var items = new float[Vector128<float>.
Count
];
111
var items = new ushort[Vector128<ushort>.
Count
];
121
var items = new uint[Vector128<uint>.
Count
];
131
var items = new ulong[Vector128<ulong>.
Count
];
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
1004
/// <returns>A new <see cref="Vector256{T}" /> with its elements set to the first <see cref="Vector128{T}.
Count
" /> elements from <paramref name="values" />.</returns>
1773
result |= vector._upper.ExtractMostSignificantBits() << Vector128<T>.
Count
;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
977
/// <returns>A new <see cref="Vector64{T}" /> with its elements set to the first <see cref="Vector128{T}.
Count
" /> elements from <paramref name="values" />.</returns>
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (49)
211
Debug.Assert(searchSpaceLength >= Vector128<short>.
Count
);
238
Debug.Assert(searchSpaceLength >= Vector128<short>.
Count
);
293
if (searchSpaceLength < Vector128<ushort>.
Count
)
312
if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.
Count
)
369
if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.
Count
)
378
ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - (2 * Vector128<short>.
Count
));
383
Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.
Count
);
391
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.
Count
);
398
Debug.Assert(searchSpaceLength >= Vector128<short>.
Count
, "We expect that the input is long enough for us to load a whole vector.");
400
ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<short>.
Count
);
427
if (searchSpaceLength < Vector128<ushort>.
Count
)
444
if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.
Count
)
500
if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.
Count
)
508
ref short twoVectorsAfterStart = ref Unsafe.Add(ref searchSpace, 2 * Vector128<short>.
Count
);
512
currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, 2 * Vector128<short>.
Count
);
515
Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.
Count
);
528
Debug.Assert(searchSpaceLength >= Vector128<short>.
Count
, "We expect that the input is long enough for us to load a whole vector.");
530
ref short oneVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<short>.
Count
);
533
? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<short>.
Count
)
597
if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
627
Debug.Assert(searchSpaceLength >= Vector128<byte>.
Count
, "We expect that the input is long enough for us to load a Vector128.");
629
ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.
Count
);
651
if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
657
ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.
Count
);
669
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<byte>.
Count
);
722
if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
752
Debug.Assert(searchSpaceLength >= Vector128<byte>.
Count
, "We expect that the input is long enough for us to load a Vector128.");
754
ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.
Count
);
757
? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.
Count
)
776
if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
782
ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.
Count
);
786
currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.
Count
);
868
if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
899
Debug.Assert(searchSpaceLength >= Vector128<byte>.
Count
, "We expect that the input is long enough for us to load a Vector128.");
901
ref byte halfVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.
Count
);
925
if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
932
ref byte vectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength - Vector128<byte>.
Count
);
944
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<byte>.
Count
);
996
if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
1027
Debug.Assert(searchSpaceLength >= Vector128<byte>.
Count
, "We expect that the input is long enough for us to load a Vector128.");
1029
ref byte halfVectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.
Count
);
1032
? ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.
Count
)
1053
if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.
Count
)
1060
ref byte vectorAfterStart = ref Unsafe.Add(ref searchSpace, Vector128<byte>.
Count
);
1064
currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<byte>.
Count
);
1266
if (offsetInVector < Vector128<short>.
Count
)
1272
return offsetInVector - Vector128<short>.
Count
+ (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref secondVector) / (nuint)sizeof(T));
1495
if (offsetInVector >= Vector128<short>.
Count
)
1499
offsetInVector -= Vector128<short>.
Count
;
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (4)
226
Vector128<ushort> source1 = Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<ushort>.
Count
);
297
return searchSpaceLength < Vector128<short>.
Count
514
Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.
Count
);
691
Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.
Count
);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticWithAsciiCharSearchValues.cs (4)
44
if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.
Count
&& char.IsAscii(span[0]))
105
if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.
Count
&& char.IsAscii(span[0]))
141
if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.
Count
&& char.IsAscii(span[^1]))
194
if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && span.Length >= Vector128<short>.
Count
&& char.IsAscii(span[^1]))
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (2)
94
if (remainingLength >= Vector128<ushort>.
Count
)
206
if (remainingLength >= Vector128<ushort>.
Count
)
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (1)
222
Vector128<ushort> source1 = Vector128.LoadUnsafe(ref source, (nuint)Vector128<ushort>.
Count
);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesPackedThreeChars.cs (8)
185
else if ((Sse2.IsSupported || AdvSimd.Arm64.IsSupported) && searchSpaceMinusValueTailLength - Vector128<byte>.
Count
>= 0)
191
ref char lastSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceMinusValueTailLength - Vector128<byte>.
Count
);
195
ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<byte>.
Count
);
196
ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<byte>.
Count
+ (int)(_ch2ByteOffset / sizeof(char)));
197
ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<byte>.
Count
+ (int)(_ch3ByteOffset / sizeof(char)));
208
searchSpace = ref Unsafe.Add(ref searchSpace, Vector128<byte>.
Count
);
212
if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpace, Vector128<byte>.
Count
)))
396
Vector128<ushort> input1 = Vector128.LoadUnsafe(ref Unsafe.AddByteOffset(ref searchSpace, byteOffset + (uint)Vector128<byte>.
Count
));
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (7)
82
if (!Vector128.IsHardwareAccelerated || searchSpaceMinusValueTailLength < Vector128<ushort>.
Count
)
191
ref char lastSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceMinusValueTailLength - Vector128<ushort>.
Count
);
195
ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<ushort>.
Count
);
196
ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<ushort>.
Count
+ (int)(_ch2ByteOffset / sizeof(char)));
197
ValidateReadPosition(ref searchSpaceStart, searchSpaceLength, ref searchSpace, Vector128<ushort>.
Count
+ (int)(_ch3ByteOffset / sizeof(char)));
208
searchSpace = ref Unsafe.Add(ref searchSpace, Vector128<ushort>.
Count
);
212
if (Unsafe.AreSame(ref searchSpace, ref Unsafe.Add(ref lastSearchSpace, Vector128<ushort>.
Count
)))
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (34)
31
if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<byte>.
Count
)
201
searchSpaceMinusValueTailLength - (nint)Vector128<byte>.
Count
;
207
Debug.Assert(offset + ch1ch2Distance + Vector128<byte>.
Count
<= searchSpaceLength);
220
offset += Vector128<byte>.
Count
;
267
if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<byte>.
Count
)
395
offset = searchSpaceMinusValueTailLength - Vector128<byte>.
Count
;
434
offset -= Vector128<byte>.
Count
;
435
if (offset == -Vector128<byte>.
Count
)
537
offset += (nuint)Vector128<byte>.
Count
;
617
offset += (nuint)Vector128<byte>.
Count
;
650
offset += (nuint)Vector128<byte>.
Count
;
690
offset += (nuint)Vector128<byte>.
Count
;
721
offset += (nuint)Vector128<byte>.
Count
;
883
else if (length >= (nuint)Vector128<byte>.
Count
)
886
nuint lengthToExamine = length - (nuint)Vector128<byte>.
Count
;
898
offset += (nuint)Vector128<byte>.
Count
;
1060
if (lengthToExamine >= (nuint)Vector128<byte>.
Count
)
1062
lengthToExamine -= (nuint)Vector128<byte>.
Count
;
1099
if (lengthToExamine >= (nuint)Vector128<byte>.
Count
)
1101
lengthToExamine -= (nuint)Vector128<byte>.
Count
;
1107
offset += (nuint)Vector128<byte>.
Count
;
1156
if (!Vector128.IsHardwareAccelerated || length < (nuint)Vector128<byte>.
Count
)
1202
Debug.Assert(length >= (uint)Vector128<byte>.
Count
);
1205
nuint lengthToExamine = length - (nuint)Vector128<byte>.
Count
;
1222
i += (nuint)Vector128<byte>.
Count
;
1282
=> (nuint)(uint)((length - (int)offset) & ~(Vector128<byte>.
Count
- 1));
1295
nint unaligned = (nint)searchSpace & (Vector128<byte>.
Count
- 1);
1296
return (nuint)(uint)((Vector128<byte>.
Count
- unaligned) & (Vector128<byte>.
Count
- 1));
1391
else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<byte>.
Count
* 2)
1393
nint lastOffset = remainder - Vector128<byte>.
Count
;
1417
offset += Vector128<byte>.
Count
;
1418
lastOffset -= Vector128<byte>.
Count
;
1421
remainder = lastOffset + Vector128<byte>.
Count
- offset;
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (27)
32
if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.
Count
)
213
searchSpaceMinusValueTailLength - (nint)Vector128<ushort>.
Count
;
218
Debug.Assert(offset + ch1ch2Distance + Vector128<ushort>.
Count
<= searchSpaceLength);
231
offset += Vector128<ushort>.
Count
;
279
if (Vector128.IsHardwareAccelerated && searchSpaceMinusValueTailLength >= Vector128<ushort>.
Count
)
415
offset = searchSpaceMinusValueTailLength - Vector128<ushort>.
Count
;
455
offset -= Vector128<ushort>.
Count
;
456
if (offset == -Vector128<ushort>.
Count
)
585
Debug.Assert(length - offset >= Vector128<ushort>.
Count
);
605
offset += Vector128<ushort>.
Count
;
698
Debug.Assert(lengthToExamine >= Vector128<ushort>.
Count
);
707
offset += Vector128<ushort>.
Count
;
729
Debug.Assert(length - offset >= Vector128<ushort>.
Count
);
749
offset += Vector128<ushort>.
Count
;
786
Debug.Assert(lengthToExamine >= Vector128<ushort>.
Count
);
795
offset += Vector128<ushort>.
Count
;
817
Debug.Assert(length - offset >= Vector128<ushort>.
Count
);
824
Debug.Assert(lengthToExamine >= Vector128<ushort>.
Count
);
833
offset += Vector128<ushort>.
Count
;
834
lengthToExamine -= Vector128<ushort>.
Count
;
870
=> (length - offset) & ~(Vector128<ushort>.
Count
- 1);
884
return (nint)(uint)(-(int)searchSpace / ElementsPerByte) & (Vector128<ushort>.
Count
- 1);
972
else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<ushort>.
Count
* 2)
974
nint lastOffset = remainder - Vector128<ushort>.
Count
;
998
offset += Vector128<ushort>.
Count
;
999
lastOffset -= Vector128<ushort>.
Count
;
1002
remainder = (lastOffset + Vector128<ushort>.
Count
- offset);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (10)
155
else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<int>.
Count
* 2)
157
nint lastOffset = remainder - Vector128<int>.
Count
;
179
offset += Vector128<int>.
Count
;
180
lastOffset -= Vector128<int>.
Count
;
183
remainder = lastOffset + Vector128<int>.
Count
- offset;
260
else if (Vector128.IsHardwareAccelerated && remainder >= Vector128<long>.
Count
* 2)
262
nint lastOffset = remainder - Vector128<long>.
Count
;
284
offset += Vector128<long>.
Count
;
285
lastOffset -= Vector128<long>.
Count
;
288
remainder = lastOffset + Vector128<long>.
Count
- offset;
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (32)
114
if (length < Vector128<short>.
Count
)
259
if (!Avx2.IsSupported && length > 2 * Vector128<short>.
Count
)
267
ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.
Count
));
272
Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.
Count
);
281
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.
Count
);
289
ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.
Count
);
318
if (length < Vector128<short>.
Count
)
460
if (!Avx2.IsSupported && length > 2 * Vector128<short>.
Count
)
468
ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.
Count
));
473
Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.
Count
);
483
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.
Count
);
491
ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.
Count
);
522
if (length < Vector128<short>.
Count
)
674
if (!Avx2.IsSupported && length > 2 * Vector128<short>.
Count
)
682
ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.
Count
));
687
Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.
Count
);
697
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.
Count
);
705
ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.
Count
);
736
if (length < Vector128<short>.
Count
)
892
if (!Avx2.IsSupported && length > 2 * Vector128<short>.
Count
)
900
ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.
Count
));
905
Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.
Count
);
915
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.
Count
);
923
ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.
Count
);
954
if (length < Vector128<short>.
Count
)
1087
if (!Avx2.IsSupported && length > 2 * Vector128<short>.
Count
)
1095
ref short twoVectorsAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - (2 * Vector128<short>.
Count
));
1100
Vector128<short> source1 = Vector128.LoadUnsafe(ref currentSearchSpace, (nuint)Vector128<short>.
Count
);
1110
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 2 * Vector128<short>.
Count
);
1118
ref short oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<short>.
Count
);
1260
if (offsetInVector >= Vector128<short>.
Count
)
1264
offsetInVector -= Vector128<short>.
Count
;
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (49)
1321
if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.
Count
)
1433
ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.
Count
));
1441
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<T>.
Count
);
1450
if ((uint)length % Vector128<T>.
Count
!= 0)
1501
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
1624
ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.
Count
);
1632
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.
Count
);
1641
if ((uint)length % Vector128<TValue>.
Count
!= 0)
1707
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
1852
ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.
Count
);
1861
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.
Count
);
1870
if ((uint)length % Vector128<TValue>.
Count
!= 0)
1914
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
2059
ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.
Count
);
2068
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.
Count
);
2077
if ((uint)length % Vector128<TValue>.
Count
!= 0)
2106
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
2219
ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.
Count
);
2229
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.
Count
);
2238
if ((uint)length % Vector128<TValue>.
Count
!= 0)
2268
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
2385
ref TValue oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<TValue>.
Count
));
2395
currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, Vector128<TValue>.
Count
);
2404
if ((uint)length % Vector128<TValue>.
Count
!= 0)
2434
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
2554
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
2694
nint offset = length - Vector128<TValue>.
Count
;
2703
offset -= Vector128<TValue>.
Count
;
2739
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
2879
nint offset = length - Vector128<TValue>.
Count
;
2889
offset -= Vector128<TValue>.
Count
;
2925
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
3029
nint offset = length - Vector128<TValue>.
Count
;
3039
offset -= Vector128<TValue>.
Count
;
3084
if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<T>.
Count
)
3100
nuint lastVectorIndex = length - (uint)Vector128<T>.
Count
;
3112
idx += (uint)Vector128<T>.
Count
;
3192
if (!Vector128.IsHardwareAccelerated || length < Vector128<TValue>.
Count
)
3292
nint offset = length - Vector128<TValue>.
Count
;
3303
offset -= Vector128<TValue>.
Count
;
3501
if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.
Count
)
3520
ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, (uint)(length - Vector128<T>.
Count
));
3531
current = ref Unsafe.Add(ref current, Vector128<T>.
Count
);
3648
if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.
Count
)
3666
nint offset = length - Vector128<T>.
Count
;
3677
offset -= Vector128<T>.
Count
;
3783
if (Vector128.IsHardwareAccelerated && length >= Vector128<T>.
Count
)
3818
ref T oneVectorAwayFromEnd = ref Unsafe.Subtract(ref end, Vector128<T>.
Count
);
3822
current = ref Unsafe.Add(ref current, Vector128<T>.
Count
);
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (6)
1314
else if (Vector128.IsHardwareAccelerated && length >= (uint)Vector128<ushort>.
Count
)
1316
nuint adjust = (length - remainingLength) & ((uint)Vector128<ushort>.
Count
- 1);
1997
if (Vector128.IsHardwareAccelerated && source.Length >= Vector128<ushort>.
Count
* 2)
2038
Debug.Assert(sourceSpan.Length >= Vector128<ushort>.
Count
);
2127
offset += (nuint)Vector128<ushort>.
Count
;
2128
} while (offset <= lengthToExamine - (nuint)Vector128<ushort>.
Count
);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (18)
52
if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.
Count
)
109
if (length <= 2 * Vector128<T>.
Count
)
113
Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector128<T>.
Count
)));
179
if (length > 4 * Vector128<T>.
Count
)
184
Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<T>.
Count
) |
185
Vector128.LoadUnsafe(ref searchSpace, 2 * (nuint)Vector128<T>.
Count
) |
186
Vector128.LoadUnsafe(ref searchSpace, 3 * (nuint)Vector128<T>.
Count
)))
191
nuint i = 4 * (nuint)Vector128<T>.
Count
;
196
nuint misalignedElements = Unsafe.OpportunisticMisalignment(ref searchSpace, (uint)Vector128<byte>.
Count
) / (nuint)sizeof(T);
198
Debug.Assert((int)i > 3 * Vector128<T>.
Count
);
200
nuint finalStart = (nuint)length - 4 * (nuint)Vector128<T>.
Count
;
202
for (; i < finalStart; i += 4 * (nuint)Vector128<T>.
Count
)
208
Vector128.LoadUnsafe(ref current, (nuint)Vector128<T>.
Count
) |
209
Vector128.LoadUnsafe(ref current, 2 * (nuint)Vector128<T>.
Count
) |
210
Vector128.LoadUnsafe(ref current, 3 * (nuint)Vector128<T>.
Count
)))
224
Vector128.LoadUnsafe(ref searchSpace, (nuint)Vector128<T>.
Count
) |
225
Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, 2 * Vector128<T>.
Count
)) |
226
Vector128.LoadUnsafe(ref Unsafe.Subtract(ref searchSpaceEnd, Vector128<T>.
Count
)));
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (10)
52
if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TLeft>.
Count
)
130
ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector128<TRight>.
Count
);
147
currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector128<TRight>.
Count
);
153
if (length % (uint)Vector128<TRight>.
Count
!= 0)
206
if (!Vector128.IsHardwareAccelerated || length < (uint)Vector128<TRight>.
Count
)
383
ref TRight oneVectorAwayFromRightEnd = ref Unsafe.Add(ref currentRightSearchSpace, length - (uint)Vector128<TRight>.
Count
);
419
currentRightSearchSpace = ref Unsafe.Add(ref currentRightSearchSpace, (uint)Vector128<TRight>.
Count
);
425
if (length % (uint)Vector128<TRight>.
Count
!= 0)
471
public static nuint Count128 => (uint)Vector128<T>.
Count
;
511
public static nuint Count256 => (uint)Vector128<byte>.
Count
;
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (6)
215
else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<byte>.
Count
)
835
else if (Vector128.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector128<ushort>.
Count
)
1350
if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= 2 * (uint)Vector128<byte>.
Count
)
1714
uint SizeOfVector128 = (uint)Vector128<byte>.
Count
;
2073
if (BitConverter.IsLittleEndian && Vector128.IsHardwareAccelerated && elementCount >= (uint)Vector128<byte>.
Count
)
2083
else if (Vector128.IsHardwareAccelerated && (elementCount - currentOffset) >= (uint)Vector128<byte>.
Count
)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (10)
68
if (inputLength >= Vector128<ushort>.
Count
)
74
char* pHighestAddressWhereCanReadOneVector = pEndOfInputBuffer - Vector128<ushort>.
Count
;
81
pInputBuffer += Vector128<ushort>.
Count
; // eagerly bump this now in preparation for next loop, will adjust later if necessary
258
pInputBuffer -= Vector128<ushort>.
Count
;
263
if (inputLength >= Vector128<ushort>.
Count
)
270
char* pHighestAddressWhereCanReadOneVector = pEndOfInputBuffer - Vector128<ushort>.
Count
;
299
for (int i = 0; i < Vector128<nuint>.
Count
; i++)
342
for (int i = 0; i < Vector128<ushort>.
Count
- 1; i++)
351
if (highSurrogateChars[Vector128<ushort>.
Count
- 1] != 0)
376
pInputBuffer += Vector128<ushort>.
Count
;
System.Runtime.Numerics (2)
System\Numerics\NumericsHelpers.cs (2)
143
while (Vector128.IsHardwareAccelerated && d.Length - offset >= Vector128<uint>.
Count
)
147
offset += Vector128<uint>.
Count
;
Test.Utilities (24)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (24)
503
for (int i = 0; i < SecretLengthBytes; i += Vector128<byte>.
Count
)
562
Vector128<ulong> acc2 = Vector128.Load(accumulators + Vector128<ulong>.
Count
);
563
Vector128<ulong> acc3 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 2);
564
Vector128<ulong> acc4 = Vector128.Load(accumulators + Vector128<ulong>.
Count
* 3);
573
source += Vector128<byte>.
Count
;
575
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
);
577
source += Vector128<byte>.
Count
;
579
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 2);
581
source += Vector128<byte>.
Count
;
583
secretVal = Vector128.Load((uint*)secret + Vector128<uint>.
Count
* 3);
585
source += Vector128<byte>.
Count
;
593
acc2 = ScrambleAccumulator128(acc2, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
));
594
acc3 = ScrambleAccumulator128(acc3, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 2));
595
acc4 = ScrambleAccumulator128(acc4, Vector128.Load((ulong*)secretForScramble + Vector128<ulong>.
Count
* 3));
600
Vector128.Store(acc2, accumulators + Vector128<ulong>.
Count
);
601
Vector128.Store(acc3, accumulators + Vector128<ulong>.
Count
* 2);
602
Vector128.Store(acc4, accumulators + Vector128<ulong>.
Count
* 3);
647
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
652
accumulators += Vector128<ulong>.
Count
;
653
secret += Vector128<byte>.
Count
;
654
source += Vector128<byte>.
Count
;
740
for (int i = 0; i < AccumulatorCount / Vector128<ulong>.
Count
; i++)
745
accumulators += Vector128<ulong>.
Count
;
746
secret += Vector128<byte>.
Count
;