Table of Contents

Method GetMaskBitPos

Namespace
Zyl.VectorTraits
Assembly
VectorTraits.dll

GetMaskBitPos(int)

Get bit pos mask by index (根据索引获取位偏移掩码). The equivalent of Vectors.Create(Scalars.GetByBits<T>(1L << index)).

public static Vector<T> GetMaskBitPos(int index)

Parameters

index int

The index (索引). The value ranges from 0 to ElementBitSize-1 (值的范围是 0 ~ ElementBitSize-1). 为了性能, 本函数不做范围检查, 调用者请确保它的值在范围内 (For performance purposes, this function does not do range checking; the caller should ensure that its value is within the range).

Returns

Vector<T>

Returns bit pos mask (返回位偏移掩码).