__builtin_vsx_xvcvspbf16

Purpose

Converts a vector of single-precision floating point values to a vector of bfloat16 values.

Note: This built-in function is valid only when both of the following conditions are met:
  • The -mcpu option is set to target Power10 processors.
  • The compiler mode is 64-bit.

Syntax

d = __builtin_vsx_xvcvspbf16(a)

Result and argument types

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

Table 1. Types of the returned value and function argument
d a
vector unsigned char vector unsigned char

Result value

Each element of d is the corresponding element of a with the value converted from single-precision floating point to bfloat16.