LAL  7.5.0.1-08ee4f4
LALSIMD.c File Reference

Prototypes

static UNUSED void cpuid (uint32_t output[4], UNUSED int functionnumber)
 
static UNUSED int64_t xgetbv (UNUSED int ctr)
 
static LAL_SIMD_ISET detect_instruction_set (void)
 
static void select_instruction_set (void)
 
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...
 

Go to the source code of this file.

Macros

#define HAVE_X86   0
 
#define LAL_ONCE(init)   (lalOnce ? (init)(), lalOnce = 0 : 0)
 

Variables

static LAL_SIMD_ISET selected_iset
 
static const char *const iset_names [LAL_SIMD_ISET_MAX]
 
static int lalOnce = 1
 

Macro Definition Documentation

◆ HAVE_X86

#define HAVE_X86   0

Definition at line 62 of file LALSIMD.c.

◆ LAL_ONCE

#define LAL_ONCE (   init)    (lalOnce ? (init)(), lalOnce = 0 : 0)

Definition at line 99 of file LALSIMD.c.

Function Documentation

◆ cpuid()

static UNUSED void cpuid ( uint32_t  output[4],
UNUSED int  functionnumber 
)
inlinestatic

Definition at line 107 of file LALSIMD.c.

◆ xgetbv()

static UNUSED int64_t xgetbv ( UNUSED int  ctr)
inlinestatic

Definition at line 148 of file LALSIMD.c.

◆ detect_instruction_set()

static LAL_SIMD_ISET detect_instruction_set ( void  )
static

Definition at line 189 of file LALSIMD.c.

◆ select_instruction_set()

static void select_instruction_set ( void  )
static

Definition at line 243 of file LALSIMD.c.

Variable Documentation

◆ selected_iset

LAL_SIMD_ISET selected_iset
static

Definition at line 77 of file LALSIMD.c.

◆ iset_names

const char* const iset_names[LAL_SIMD_ISET_MAX]
static
Initial value:
= {
[LAL_SIMD_ISET_GEN] = "GEN",
[LAL_SIMD_ISET_SSE] = "SSE",
[LAL_SIMD_ISET_SSE2] = "SSE2",
[LAL_SIMD_ISET_SSE3] = "SSE3",
[LAL_SIMD_ISET_SSSE3] = "SSSE3",
[LAL_SIMD_ISET_SSE4_1] = "SSE4.1",
[LAL_SIMD_ISET_SSE4_2] = "SSE4.2",
[LAL_SIMD_ISET_AVX] = "AVX",
[LAL_SIMD_ISET_AVX2] = "AVX2",
}
@ LAL_SIMD_ISET_SSE4_1
SSE version 4.1.
Definition: LALSIMD.h:54
@ LAL_SIMD_ISET_SSE3
SSE version 3.
Definition: LALSIMD.h:52
@ LAL_SIMD_ISET_SSE
SSE (Streaming SIMD Extensions)
Definition: LALSIMD.h:50
@ LAL_SIMD_ISET_AVX2
AVX version 2.
Definition: LALSIMD.h:57
@ LAL_SIMD_ISET_SSE4_2
SSE version 4.2.
Definition: LALSIMD.h:55
@ LAL_SIMD_ISET_SSE2
SSE version 2.
Definition: LALSIMD.h:51
@ LAL_SIMD_ISET_GEN
GENeric floating-point unit.
Definition: LALSIMD.h:49
@ LAL_SIMD_ISET_AVX
AVX (Advanced Vector Extensions)
Definition: LALSIMD.h:56
@ LAL_SIMD_ISET_SSSE3
Supplemental SSE version 3.
Definition: LALSIMD.h:53

Definition at line 80 of file LALSIMD.c.

◆ lalOnce

int lalOnce = 1
static

Definition at line 98 of file LALSIMD.c.