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
array
T[]Source array (源数组).
index
intThe item index (项目的索引).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
T
Type 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
array
T[]Source array (源数组).
index
nintThe item index (项目的索引).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
T
Type 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
array
T[]Source array (源数组).
index
intThe item index (项目的索引).
indexMask
intThe index mask. When bypassing the array range check, index will do an
and
operation with this parameter (索引的掩码. 当绕过数组范围检查时, index会与本参数做 and运算).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
T
Type 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
array
T[]Source array (源数组).
index
nintThe item index (项目的索引).
indexMask
nintThe index mask. When bypassing the array range check, index will do an
and
operation with this parameter (索引的掩码. 当绕过数组范围检查时, index会与本参数做 and运算).
Returns
- T
Return a reference to an array item (返回数组项目的引用).
Type Parameters
T
Type of array item (数组项目的类型).