vec_replace_elt
Purpose
Replaces an element in a vector.
Note: This built-in function
is valid only when the -mcpu option is set to target Power10 processors.
Syntax
d=vec_replace_elt(a,b,c)
Result and argument types
The following table describes the types of the returned value and the function arguments.
| d | a | b | c |
|---|---|---|---|
| vector signed int | vector signed int | signed int | const int |
| vector unsigned int | vector unsigned int | unsigned int | const int |
| vector signed long long | vector signed long long | signed long long | const int |
| vector unsigned long long | vector unsigned long long | unsigned long long | const int |
| vector double | vector double | double | const int |
| vector float | vector float | float | const int |
Result value
The result d is set to the value of a. Then the element of d indexed by c using natural element order is set to
the value of b.
Note: The value of
c must be in
the range of 0 to 3, inclusive for word-length elements, and in the range of 0 and 1, inclusive for
doubleword-length elements.