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

Constructors and Initialization

The following tables show how to create and initialize F32vec objects with the Fvec classes.

Constructor Declaration

Example

Intrinsic

Returns

F64vec2 A;
F32vec4 B;
F32vec1 C;

N/A

N/A

__m128 Object Initialization

Example

Intrinsic

Returns

F64vec2 A(__m128d mm);
F32vec4 B(__m128 mm);
F32vec1 C(__m128 mm);

N/A

N/A

Double Initialization

Example

Intrinsic

Returns

/* Initializes two doubles. */
F64vec2 A(double d0, double d1);
F64vec2 A = F64vec2(double d0, double d1);

_mm_set_pd

A0 := d0;
A1 := d1;

F64vec2 A(double d0);
/* Initializes both return values
with the same double precision value */.

_mm_set1_pd

A0 := d0;
A1 := d0;

Float Initialization

Example

Intrinsic

Returns

F32vec4 A(float f3, float f2,
float f1, float f0);

F32vec4 A = F32vec4(float f3, float f2,
float f1, float f0);

_mm_set_ps

A0 := f0;
A1 := f1;
A2 := f2;
A3 := f3;

F32vec4 A(float f0);
/* Initializes all return values
with the same floating point value. */

_mm_set1_ps

A0 := f0;
A1 := f0;
A2 := f0;
A3 := f0;

F32vec4 A(double d0);
/* Initialize all return values with
the same double-precision value. */

_mm_set1_ps(d)

A0 := d0;
A1 := d0;
A2 := d0;
A3 := d0;

F32vec1 A(double d0);
/* Initializes the lowest value of A
with d0 and the other values with 0.*/

_mm_set_ss(d)

A0 := d0;
A1 := 0;
A2 := 0;
A3 := 0;

F32vec1 B(float f0);
/* Initializes the lowest value of B
with f0 and the other values with 0.*/

_mm_set_ss

B0 := f0;
B1 := 0;
B2 := 0;
B3 := 0;

F32vec1 B(int I);
/* Initializes the lowest value of B
with f0, other values are undefined.*/

_mm_cvtsi32_ss

B0 := f0;
B1 := {}
B2 := {}
B3 := {}