Method LastIndexOf
LastIndexOf<T>(Vector256<T>, T)
Determines the index of the last element in a vector that is equal to a given value.
public static int LastIndexOf<T>(Vector256<T> vector, T value) where T : struct
Parameters
vectorVector256<T>The vector whose elements are being checked.
valueTThe value to check for in
vector
Returns
- int
The index into
vectorrepresenting the last element that was equal tovalue; otherwise,-1if no such element exists.
Type Parameters
TThe type of the elements in the vector.
Exceptions
- NotSupportedException
The type of
vectorandvalue(T) is not supported.