vec_splats

Purpose

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

Note: This built-in function is valid only when you specify the -qaltivec option and include the altivec.h file.

Syntax

d=vec_splats(a)

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
vector signed char signed char
vector unsigned char unsigned char
vector signed short signed short
vector unsigned short unsigned short
vector signed int signed int
vector unsigned int unsigned int
vector signed long long signed long long
vector unsigned long long unsigned long long
vector float float
vector double double

Result value

Each element of the result has the value of a.