Method UncheckGetItemReference
- Namespace
- Zyl.VectorTraits.Impl.Util
- Assembly
- VectorTraits.dll
UncheckGetItemReference<T>(T[], int)
Get a reference to an array item, and bypass the array bounds check if possible (获取数组项目的引用, 并尽可能绕过数组边界检查).
public static ref T UncheckGetItemReference<T>(T[] array, int index)
Parameters
arrayT[]Source array (源数组).
indexintThe item index (项目的索引).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
TType of array item (数组项目的类型).
- See Also
-
GetArrayDataReference<T>(T[])
UncheckGetItemReference<T>(T[], nint)
Get a reference to an array item, and bypass the array bounds check if possible (获取数组项目的引用, 并尽可能绕过数组边界检查).
public static ref T UncheckGetItemReference<T>(T[] array, nint index)
Parameters
arrayT[]Source array (源数组).
indexnintThe item index (项目的索引).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
TType of array item (数组项目的类型).
UncheckGetItemReference<T>(T[], int, int)
Get a reference to an array item, and bypass the array bounds check if possible (获取数组项目的引用, 并尽可能绕过数组边界检查).
public static ref T UncheckGetItemReference<T>(T[] array, int index, int indexMask)
Parameters
arrayT[]Source array (源数组).
indexintThe item index (项目的索引).
indexMaskintThe index mask. When bypassing the array range check, index will do an
andoperation with this parameter (索引的掩码. 当绕过数组范围检查时, index会与本参数做 and运算).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
TType of array item (数组项目的类型).
UncheckGetItemReference<T>(T[], nint, nint)
Get a reference to an array item, and bypass the array bounds check if possible (获取数组项目的引用, 并尽可能绕过数组边界检查).
public static ref T UncheckGetItemReference<T>(T[] array, nint index, nint indexMask)
Parameters
arrayT[]Source array (源数组).
indexnintThe item index (项目的索引).
indexMasknintThe index mask. When bypassing the array range check, index will do an
andoperation with this parameter (索引的掩码. 当绕过数组范围检查时, index会与本参数做 and运算).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
TType of array item (数组项目的类型).