Developer Guide and Reference

Contents

Logical Operators

The following table lists the logical operators of the Fvec classes and generic syntax. The logical operators for
F32vec1
classes use only the lower 32 bits.
Fvec Logical Operators Return Value Mapping
Bitwise Operation
Operators
Generic Syntax
AND
&
&=
R = A & B;
R &= A;
OR
|
|=
R = A | B;
R |= A;
XOR
^
^=
R = A ^ B;
R ^= A;
andnot
andnot
R = andnot(A);
The following table lists standard logical operators syntax and corresponding intrinsics. Note that there is no corresponding scalar intrinsic for the
F32vec1
classes, which accesses the lower 32 bits of the packed vector intrinsics.
Logical Operations for Fvec Classes
Operation
Returns
Example Syntax Usage
Intrinsic
AND
4 floats
F32vec4 & = F32vec4 A & F32vec4 B;
F32vec4 & &= F32vec4 A;
_mm_and_ps
 
2 doubles
F64vec2 R = F64vec2 A & F64vec2 B;
F64vec2 R &= F64vec2 A;
_mm_and_pd
 
1 float
F32vec1 R = F32vec1 A & F32vec1 B;
F32vec1 R &= F32vec1 A;
_mm_and_ps
OR
4 floats
F32vec4 R = F32vec4 A | F32vec4 B;
F32vec4 R |= F32vec4 A;
_mm_or_ps
 
2 doubles
F64vec2 R = F64vec2 A | F64vec2 B;
F64vec2 R |= F64vec2 A;
_mm_or_pd
 
1 float
F32vec1 R = F32vec1 A | F32vec1 B;
F32vec1 R |= F32vec1 A;
_mm_or_ps
XOR
4 floats
F32vec4 R = F32vec4 A ^ F32vec4 B;
F32vec4 R ^= F32vec4 A;
_mm_xor_ps
 
2 doubles
F64vec2 R = F64vec2 A ^ F64vec2 B;
F64vec2 R ^= F64vec2 A;
_mm_xor_pd
 
1 float
F32vec1 R = F32vec1 A ^ F32vec1 B;
F32vec1 R ^= F32vec1 A;
_mm_xor_ps
ANDNOT
2 doubles
F64vec2 R = andnot(F64vec2 A,
F64vec2 B);
_mm_andnot_pd

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804