vec_insert: Vector Insert

d = vec_insert(a, b, c)

Returns a copy of the vector b with the value of its element c replaced by a. 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.

Table 1. Vector Insert
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 double double vector double