Vector256.WithElement(Vector256<T>, Int32, T) Vector256.WithElement(Vector256<T>, Int32, T) Vector256.WithElement(Vector256<T>, Int32, T) Vector256.WithElement(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.

public:
generic <typename T>
 where T : value class[System::Runtime::CompilerServices::Extension]
 static System::Runtime::Intrinsics::Vector256<T> WithElement(System::Runtime::Intrinsics::Vector256<T> vector, int index, T value);
public static System.Runtime.Intrinsics.Vector256<T> WithElement<T> (this System.Runtime.Intrinsics.Vector256<T> vector, int index, T value) where T : struct;
static member WithElement : System.Runtime.Intrinsics.Vector256<'T (requires 'T : struct)> * int * 'T -> System.Runtime.Intrinsics.Vector256<'T (requires 'T : struct)> (requires 'T : struct)
<Extension()>
Public Function WithElement(Of T As Structure) (vector As Vector256(Of T), index As Integer, value As T) As Vector256(Of T)

Type Parameters

T

The type of the input vector.

Parameters

vector
Vector256<T> Vector256<T> Vector256<T> Vector256<T>

The vector to get the remaining elements from.

index
Int32 Int32 Int32 Int32

The index of the element to set.

value
T T T T

The value to set the element to.

Returns

A Vector256<T> 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

Applies to