Прочитај на енглеском Уреди

Делите путем


Vector256.WithElement<T>(Vector256<T>, Int32, T) Method

Definition

Creates a new Vector256<T> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the given vector.

C#
public static System.Runtime.Intrinsics.Vector256<T> WithElement<T>(this System.Runtime.Intrinsics.Vector256<T> vector, int index, T value);
C#
public static System.Runtime.Intrinsics.Vector256<T> WithElement<T>(this System.Runtime.Intrinsics.Vector256<T> vector, int index, T value) where T : struct;

Type Parameters

T

The type of the input vector.

Parameters

vector
Vector256<T>

The vector to get the remaining elements from.

index
Int32

The index of the element to set.

value
T

The value to set the element to.

Returns

A vector with the value of the element at index set to value and the remaining elements set to the same value as that in vector.

Exceptions

The type of vector (T) is not supported.

index was less than zero or greater than the number of elements.

Applies to

Производ Верзије
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10