vec_splat

Purpose

Returns a vector of which all the elements are set to a given value.

Syntax

d=vec_splat(a, b)

Result and argument types

The following table describes the types of the returned value and the function arguments.

Table 1. Result and argument types
d a b
The same type as argument a vector bool char 0 - 15
vector signed char 0 - 15
vector unsigned char 0 - 15
vector bool short 0 - 7
vector signed short 0 - 7
vector unsigned short 0 - 7
vector pixel 0 - 7
vector bool int 0 - 3
vector signed int 0 - 3
vector unsigned int 0 - 3
vector bool long long 0 - 1
vector signed long long 0 - 1
vector unsigned long long 0 - 1
vector float 0 - 3
vector double 0 - 1

Result value

Each element of d contains the value of the element of a that is specified by b.