vec_splat: Vector Splat

d = vec_splat(a, b)

Returns a vector that has all of its elements set to a given value. The value of each element of the result is the value of the element of a specified by b.

Table 1. Vector Splat
d a b
vector bool char vector bool char 0 - 15
vector signed char vector signed char
vector unsigned char vector unsigned char
vector bool short vector bool short 0 - 7
vector signed short vector signed short
vector unsigned short vector unsigned short
vector bool int vector bool int 0 - 3
vector signed int vector signed int
vector unsigned int vector unsigned int
vector bool long long vector bool long long 0 - 1
vector signed long long vector signed long long
vector unsigned long long vector unsigned long long
vector double vector double