vec_insert

Purpose

Returns a copy of the vector b with the value of its element c replaced by a.

Syntax

d=vec_insert(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 char signed char vector signed char signed int
vector unsigned char unsigned char vector bool char
vector unsigned char
vector signed short signed short vector signed short
vector unsigned short unsigned short vector bool short
vector unsigned short
vector signed int signed int vector signed int
vector unsigned int unsigned int vector bool int
vector unsigned int
vector signed long long signed long long vector signed long long
vector unsigned long long unsigned long long vector bool long long
vector unsigned long long
vector float float vector float
vector double double vector double

Result value

This function uses the modulo arithmetic on c to determine the element number. For example, if c is out of range, the compiler uses c modulo the number of elements in the vector to determine the element position.



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us