LAL  7.1.7.1-ab2cc12

Detailed Description

SIMD extension detection and runtime selection for LALSuite.

Author
Karl Wette

Synopsis

#include <lal/LALSIMD.h>
perform_sse_magic(out, in, ...);
}

Prototypes

int XLALHaveSIMDInstructionSet (LAL_SIMD_ISET iset)
 Return true if the executing machine supports the given instruction set. More...
 
const char * XLALSIMDInstructionSetName (LAL_SIMD_ISET iset)
 Return the name of a given instruction set as a string. More...
 

Enumerations

enum  LAL_SIMD_ISET {
  LAL_SIMD_ISET_GEN, LAL_SIMD_ISET_SSE, LAL_SIMD_ISET_SSE2, LAL_SIMD_ISET_SSE3,
  LAL_SIMD_ISET_SSSE3, LAL_SIMD_ISET_SSE4_1, LAL_SIMD_ISET_SSE4_2, LAL_SIMD_ISET_AVX,
  LAL_SIMD_ISET_AVX2, LAL_SIMD_ISET_MAX
}
 SIMD instruction sets this module can detect. More...
 

Convenience macros for SIMD runtime selection

#define LAL_HAVE_SSE_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE))
 
#define LAL_HAVE_SSE2_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE2))
 
#define LAL_HAVE_SSE3_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE3))
 
#define LAL_HAVE_SSSE3_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSSE3))
 
#define LAL_HAVE_SSE4_1_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE4_1))
 
#define LAL_HAVE_SSE4_2_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE4_2))
 
#define LAL_HAVE_AVX_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_AVX))
 
#define LAL_HAVE_AVX2_RUNTIME()   (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_AVX2))
 

Function Documentation

◆ XLALHaveSIMDInstructionSet()

int XLALHaveSIMDInstructionSet ( LAL_SIMD_ISET  iset)

Return true if the executing machine supports the given instruction set.

Definition at line 284 of file LALSIMD.c.

◆ XLALSIMDInstructionSetName()

const char* XLALSIMDInstructionSetName ( LAL_SIMD_ISET  iset)

Return the name of a given instruction set as a string.

Definition at line 289 of file LALSIMD.c.

Enumeration Type Documentation

◆ LAL_SIMD_ISET

SIMD instruction sets this module can detect.

Enumerator
LAL_SIMD_ISET_GEN 

GENeric floating-point unit.

LAL_SIMD_ISET_SSE 

SSE (Streaming SIMD Extensions)

LAL_SIMD_ISET_SSE2 

SSE version 2.

LAL_SIMD_ISET_SSE3 

SSE version 3.

LAL_SIMD_ISET_SSSE3 

Supplemental SSE version 3.

LAL_SIMD_ISET_SSE4_1 

SSE version 4.1.

LAL_SIMD_ISET_SSE4_2 

SSE version 4.2.

LAL_SIMD_ISET_AVX 

AVX (Advanced Vector Extensions)

LAL_SIMD_ISET_AVX2 

AVX version 2.

LAL_SIMD_ISET_MAX 

Definition at line 47 of file LALSIMD.h.

Macro Definition Documentation

◆ LAL_HAVE_SSE_RUNTIME

#define LAL_HAVE_SSE_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE))

Definition at line 74 of file LALSIMD.h.

◆ LAL_HAVE_SSE2_RUNTIME

#define LAL_HAVE_SSE2_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE2))

Definition at line 75 of file LALSIMD.h.

◆ LAL_HAVE_SSE3_RUNTIME

#define LAL_HAVE_SSE3_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE3))

Definition at line 76 of file LALSIMD.h.

◆ LAL_HAVE_SSSE3_RUNTIME

#define LAL_HAVE_SSSE3_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSSE3))

Definition at line 77 of file LALSIMD.h.

◆ LAL_HAVE_SSE4_1_RUNTIME

#define LAL_HAVE_SSE4_1_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE4_1))

Definition at line 78 of file LALSIMD.h.

◆ LAL_HAVE_SSE4_2_RUNTIME

#define LAL_HAVE_SSE4_2_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_SSE4_2))

Definition at line 79 of file LALSIMD.h.

◆ LAL_HAVE_AVX_RUNTIME

#define LAL_HAVE_AVX_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_AVX))

Definition at line 80 of file LALSIMD.h.

◆ LAL_HAVE_AVX2_RUNTIME

#define LAL_HAVE_AVX2_RUNTIME ( )    (XLALHaveSIMDInstructionSet(LAL_SIMD_ISET_AVX2))

Definition at line 81 of file LALSIMD.h.