Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Fvec Syntax and Notation

This reference uses the following conventions for syntax and return values.

Fvec Classes Syntax Notation

Fvec classes use one of the following the syntax conventions, where

  • [operator] is an operator (for example, &, |, or ^ )
  • [Fvec_Class] is any Fvec class ( F64vec2, F32vec4, or F32vec1 )
  • R, A, B are declared Fvec variables of the type indicated

Syntax Convention One

Syntax:

[Fvec_Class] R = [Fvec_Class] A [operator][Ivec_Class] B;

Example:

F64vec2 R = F64vec2 A & F64vec2 B;

Syntax Convention Two

Syntax:

[Fvec_Class] R = [operator]([Fvec_Class] A,[Fvec_Class] B);

Example:

F64vec2 R = andnot(F64vec2 A, F64vec2 B);

Syntax Convention Three

Syntax:

[Fvec_Class] R [operator]= [Fvec_Class] A;

Example:

F64vec2 R &= F64vec2 A;

Return Value Notation

Because the Fvec classes have packed elements, the return values typically follow the conventions presented in the following table. F32vec4 returns four single-precision, floating-point values (R0, R1, R2, and R3); F64vec2 returns two double-precision, floating-point values, and F32vec1 returns the lowest single-precision floating-point value (R0).

Syntax Convention One Example

Syntax Convention Two Example

Syntax Convention Three Example

F32vec4

F64vec2

F32vec1

R0 := A0 & B0;

R0 := A0 andnot B0;

R0 &= A0;

x

x

x

R1 := A1 & B1;

R1 := A1 andnot B1;

R1 &= A1;

x

x

N/A

R2 := A2 & B2;

R2 := A2 andnot B2;

R2 &= A2;

x

N/A

N/A

R3 := A3 & B3

R3 := A3 andhot B3;

R3 &= A3;

x

N/A

N/A