Method GetMaskBits
- Namespace
- Zyl.VectorTraits.Impl
- Assembly
- VectorTraits.dll
GetMaskBits<T>(int)
Get bits mask by index (根据索引获取位集掩码). The index value ranges from 0 to sizeof(T)*8-1
(索引值的范围是 0 ~ sizeof(T)*8-1
).
The equivalent of Vector64s<T>.GetMaskBits(index)
.
[Obsolete("It is only suitable for unit testing because it contains branching statements and has poor performance. In general, it is recommended to use the non-generic version of the methods (因它含有分支语句, 性能较差, 仅适用于单元测试. 一般情况下, 建议使用非泛型版方法).")]
public static Vector64<T> GetMaskBits<T>(int index) where T : struct
Parameters
index
intThe index (索引). The index value ranges from 0 to
sizeof(T)*8-1
(索引值的范围是 0 ~sizeof(T)*8-1
). 为了性能, 本函数不做范围检查, 调用者请确保它的值在范围内 (For performance purposes, this function does not do range checking; the caller should ensure that its value is within the range).
Returns
- Vector64<T>
Returns bits mask mask (返回位集掩码).
Type Parameters
T
The vector element type (向量中的元素的类型).
Remarks
It performs better than GetMaskBits(int) when running net5+.
- See Also