Skip to content

Commit

Permalink
Rename some global variables to avoid clashes (#499)
Browse files Browse the repository at this point in the history
This is a follow up from #454.
  • Loading branch information
joanaxcruz authored Jan 8, 2024
1 parent ba403c0 commit 132d0ba
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/libm/dispscalar.c.org
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include "dispatcher.h"

NOEXPORT double sleef_cpuidtmp2;
static void tryFMA() { sleef_cpuidtmp2 = Sleef_sind1_u10purecfma(sleef_cpuidtmp2); }
NOEXPORT double sleef_cpuid_SCALFMA;
static void tryFMA() { sleef_cpuid_SCALFMA = Sleef_sind1_u10purecfma(sleef_cpuid_SCALFMA); }

#define SUBST_IF_EXT1(funcExt1) if (cpuSupportsExt(tryFMA)) p = funcExt1;
#define SUBST_IF_EXT2(funcExt2)
Expand Down
6 changes: 3 additions & 3 deletions src/libm/tryvsx3.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <altivec.h>

__vector double sleef_cpuidtmp0;
__vector unsigned long long sleef_cpuidtmp1, sleef_cpuidtmp2;
__vector double sleef_cpuid_VSX0;
__vector unsigned long long sleef_cpuid_VSX1, sleef_cpuid_VSX3;

void sleef_tryVSX3() {
sleef_cpuidtmp0 = vec_insert_exp(sleef_cpuidtmp1, sleef_cpuidtmp2);
sleef_cpuid_VSX0 = vec_insert_exp(sleef_cpuid_VSX1, sleef_cpuid_VSX3);
}
6 changes: 3 additions & 3 deletions src/libm/tryvxe2.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <vecintrin.h>

__vector float sleef_cpuidtmp0;
__vector int sleef_cpuidtmp1;
__vector float sleef_cpuid_VXE2;
__vector int sleef_cpuid_VXE1;

void sleef_tryVXE2() {
sleef_cpuidtmp0 = vec_float(sleef_cpuidtmp1);
sleef_cpuid_VXE2 = vec_float(sleef_cpuid_VXE1);
}
4 changes: 2 additions & 2 deletions src/quad/qdispscalar.c.org
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include "qdispatcher.h"

NOEXPORT Sleef_quad sleef_cpuidtmp0;
static void tryFMA() { sleef_cpuidtmp0 = Sleef_sinq1_u10purecfma(sleef_cpuidtmp0); }
NOEXPORT Sleef_quad sleef_cpuid_QUADFMA_0;
static void tryFMA() { sleef_cpuid_QUADFMA_0 = Sleef_sinq1_u10purecfma(sleef_cpuid_QUADFMA_0); }

#define SUBST_IF_EXT1(funcExt1) if (cpuSupportsExt(tryFMA)) p = funcExt1;

Expand Down
8 changes: 4 additions & 4 deletions src/quad/qdispx2.c.org
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@

#include "qdispatcher.h"

NOEXPORT Sleef_quadx2 sleef_cpuidtmp1;
NOEXPORT Sleef_quadx2 sleef_cpuid_EXT;

#ifdef ENABLE_AVX2
static void tryEXT1() { sleef_cpuidtmp1 = Sleef_sinq2_u10avx2128(sleef_cpuidtmp1); }
static void tryEXT1() { sleef_cpuid_EXT = Sleef_sinq2_u10avx2128(sleef_cpuid_EXT); }
#define SUBST_IF_EXT1(funcExt1) if (cpuSupportsExt(tryEXT1)) p = funcExt1;
#endif

#ifdef ENABLE_VSX3
static void tryEXT1() { sleef_cpuidtmp1 = Sleef_sinq2_u10vsx3(sleef_cpuidtmp1); }
static void tryEXT1() { sleef_cpuid_EXT = Sleef_sinq2_u10vsx3(sleef_cpuid_EXT); }
#define SUBST_IF_EXT1(funcExt1) if (cpuSupportsExt(tryEXT1)) p = funcExt1;
#endif

#ifdef ENABLE_VXE2
static void tryEXT1() { sleef_cpuidtmp1 = Sleef_sinq2_u10vxe2(sleef_cpuidtmp1); }
static void tryEXT1() { sleef_cpuid_EXT = Sleef_sinq2_u10vxe2(sleef_cpuid_EXT); }
#define SUBST_IF_EXT1(funcExt1) if (cpuSupportsExt(tryEXT1)) p = funcExt1;
#endif

Expand Down

0 comments on commit 132d0ba

Please sign in to comment.