spy v3.0.0
Andrée Borrel
Loading...
Searching...
No Matches
Supplemental Instruction Sets

The instructions some extensions add on top of an existing set. More...

Detailed Description

The instructions some extensions add on top of an existing set.

One indicator per supplemental set, true when the flags turned it on. The AVX family adds FMA3, FMA4, XOP and F16C, and the AVX-512 subsets live in their own namespace.

Variables

constexpr bool spy::supports::avx512::_4fmaps_ = spy_implementation_defined {}
 AVX-512 4FMAPS availability indicator.
constexpr bool spy::supports::avx512::bf16_ = spy_implementation_defined {}
 AVX-512 bfloat16 availability indicator.
constexpr bool spy::supports::avx512::bitalg_ = spy_implementation_defined {}
 AVX-512 Bit Algorithms availability indicator.
constexpr bool spy::supports::avx512::bw_ = spy_implementation_defined {}
 AVX-512 Byte and Word availability indicator.
constexpr bool spy::supports::avx512::cd_ = spy_implementation_defined {}
 AVX-512 Conflict Detection availability indicator.
constexpr bool spy::supports::avx512::dq_ = spy_implementation_defined {}
 AVX-512 Doubleword and Quadword availability indicator.
constexpr bool spy::supports::avx512::er_ = spy_implementation_defined {}
 AVX-512 Exponential and Reciprocal availability indicator.
constexpr bool spy::supports::f16c_ = spy_implementation_defined {}
 Half-precision conversion availability indicator.
constexpr bool spy::supports::fma4_ = spy_implementation_defined {}
 FMA4 availability indicator.
constexpr bool spy::supports::fma_ = spy_implementation_defined {}
 Fused multiply-add availability indicator.
constexpr bool spy::supports::avx512::ifma_ = spy_implementation_defined {}
 AVX-512 Integer Fused Multiply-Add availability indicator.
constexpr bool spy::supports::avx512::pf_ = spy_implementation_defined {}
 AVX-512 Prefetch availability indicator.
constexpr bool spy::supports::avx512::popcntdq_ = spy_implementation_defined {}
 AVX-512 population count availability indicator.
constexpr bool spy::supports::avx512::vbmi2_ = spy_implementation_defined {}
 AVX-512 Vector Byte Manipulation 2 availability indicator.
constexpr bool spy::supports::avx512::vbmi_ = spy_implementation_defined {}
 AVX-512 Vector Byte Manipulation availability indicator.
constexpr bool spy::supports::avx512::vl_ = spy_implementation_defined {}
 AVX-512 Vector Length availability indicator.
constexpr bool spy::supports::avx512::vnni_ = spy_implementation_defined {}
 AVX-512 Vector Neural Network availability indicator.
constexpr bool spy::supports::avx512::vnniw_ = spy_implementation_defined {}
 AVX-512 4VNNIW availability indicator.
constexpr bool spy::supports::avx512::vpintersect_ = spy_implementation_defined {}
 AVX-512 vector pair intersection availability indicator.
constexpr bool spy::supports::xop_ = spy_implementation_defined {}
 XOP availability indicator.

Variable Documentation

◆ _4fmaps_

bool spy::supports::avx512::_4fmaps_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 4FMAPS availability indicator.

Evaluates to true when the AVX-512 four-iteration packed single-precision fused multiply-add subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}
constexpr bool fma_
Fused multiply-add availability indicator.
Definition x86.hpp:143
constexpr bool xop_
XOP availability indicator.
Definition x86.hpp:179
constexpr bool fma4_
FMA4 availability indicator.
Definition x86.hpp:161
constexpr bool cd_
AVX-512 Conflict Detection availability indicator.
Definition x86.hpp:236

◆ bf16_

bool spy::supports::avx512::bf16_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 bfloat16 availability indicator.

Evaluates to true when the AVX-512 bfloat16 subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ bitalg_

bool spy::supports::avx512::bitalg_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Bit Algorithms availability indicator.

Evaluates to true when the AVX-512 Bit Algorithms subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ bw_

bool spy::supports::avx512::bw_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Byte and Word availability indicator.

Evaluates to true when the AVX-512 Byte and Word subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ cd_

bool spy::supports::avx512::cd_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Conflict Detection availability indicator.

Evaluates to true when the AVX-512 Conflict Detection subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ dq_

bool spy::supports::avx512::dq_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Doubleword and Quadword availability indicator.

Evaluates to true when the AVX-512 Doubleword and Quadword subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ er_

bool spy::supports::avx512::er_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Exponential and Reciprocal availability indicator.

Evaluates to true when the AVX-512 Exponential and Reciprocal subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ f16c_

bool spy::supports::f16c_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

Half-precision conversion availability indicator.

Evaluates to true when the F16C instructions converting between half and single precision are enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ fma4_

bool spy::supports::fma4_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

FMA4 availability indicator.

Evaluates to true when the FMA4 instructions of AMD's AVX implementation are enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ fma_

bool spy::supports::fma_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

Fused multiply-add availability indicator.

Evaluates to true when the FMA3 instructions of the AVX family are enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ ifma_

bool spy::supports::avx512::ifma_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Integer Fused Multiply-Add availability indicator.

Evaluates to true when the AVX-512 Integer Fused Multiply-Add subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ pf_

bool spy::supports::avx512::pf_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Prefetch availability indicator.

Evaluates to true when the AVX-512 Prefetch subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ popcntdq_

bool spy::supports::avx512::popcntdq_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 population count availability indicator.

Evaluates to true when the AVX-512 population count subset for doubleword and quadword elements is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ vbmi2_

bool spy::supports::avx512::vbmi2_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Vector Byte Manipulation 2 availability indicator.

Evaluates to true when the second AVX-512 Vector Byte Manipulation subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ vbmi_

bool spy::supports::avx512::vbmi_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Vector Byte Manipulation availability indicator.

Evaluates to true when the AVX-512 Vector Byte Manipulation subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ vl_

bool spy::supports::avx512::vl_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Vector Length availability indicator.

Evaluates to true when the AVX-512 Vector Length subset, which applies the AVX-512 instructions to 128 and 256 bit registers, is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ vnni_

bool spy::supports::avx512::vnni_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 Vector Neural Network availability indicator.

Evaluates to true when the AVX-512 Vector Neural Network subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ vnniw_

bool spy::supports::avx512::vnniw_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 4VNNIW availability indicator.

Evaluates to true when the AVX-512 four-iteration word neural network subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ vpintersect_

bool spy::supports::avx512::vpintersect_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

AVX-512 vector pair intersection availability indicator.

Evaluates to true when the AVX-512 vector pair intersection subset is enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}

◆ xop_

bool spy::supports::xop_ = spy_implementation_defined {}
inlineconstexpr

#include <spy/simd/x86.hpp>

XOP availability indicator.

Evaluates to true when the XOP instructions of AMD's AVX implementation are enabled.

Example

#include <iostream>
#include <spy/spy.hpp>
int main()
{
if constexpr(spy::supports::fma_) std::cout << "This code has been compiled with FMA3 support.\n";
else if constexpr(spy::supports::fma4_)
std::cout << "This code has been compiled with FMA4 support.\n";
else if constexpr(spy::supports::xop_)
std::cout << "This code has been compiled with XOP support.\n";
else if constexpr(spy::supports::avx512::cd_)
std::cout << "This code has been compiled with AV512-CD support.\n";
}