Skip to content

Commit

Permalink
CMake option is NRN_ENABLE_ARCH_INDEP_EXP_POW (#3182)
Browse files Browse the repository at this point in the history
All the NRN_ARCH_INDEP_EXP_POW should be NRN_ENABLE_ARCH_INDEP_EXP_POW
  • Loading branch information
nrnhines authored Nov 10, 2024
1 parent 01773eb commit 5fa9658
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ if(NRN_ENABLE_PROFILING)
message(STATUS " Caliper | ${caliper_DIR}")
endif()
endif()
if(NRN_ENABLE_DIGEST OR NRN_ARCH_INDEP_EXP_POW)
if(NRN_ENABLE_DIGEST OR NRN_ENABLE_ARCH_INDEP_EXP_POW)
message(STATUS "NRN_ENABLE_DIGEST | ${NRN_ENABLE_DIGEST}")
message(STATUS "NRN_ENABLE_ARCH_INDEP_EXP_POW | ${NRN_ENABLE_ARCH_INDEP_EXP_POW}")
endif()
Expand Down
14 changes: 7 additions & 7 deletions src/oc/math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <cerrno>
#include <cstdio>

#if NRN_ARCH_INDEP_EXP_POW
#if NRN_ENABLE_ARCH_INDEP_EXP_POW
#include <mpfr.h>
#endif

Expand Down Expand Up @@ -65,7 +65,7 @@ double hoc_Log10(double x) {
return errcheck(log10(x), "log10");
}

#if NRN_ARCH_INDEP_EXP_POW
#if NRN_ENABLE_ARCH_INDEP_EXP_POW

static double accuracy32(double val) {
int ex;
Expand Down Expand Up @@ -140,18 +140,18 @@ int nrn_use_exp_pow_precision(int style) {
return style;
}

#endif // NRN_ARCH_INDEP_EXP_POW
#endif // NRN_ENABLE_ARCH_INDEP_EXP_POW

void hoc_use_exp_pow_precision() {
int style = 0;
if (ifarg(1)) {
style = chkarg(1, 0.0, 2.0);
}
#if NRN_ARCH_INDEP_EXP_POW
#if NRN_ENABLE_ARCH_INDEP_EXP_POW
style = nrn_use_exp_pow_precision(style);
#else
style = 0;
#endif // NRN_ARCH_INDEP_EXP_POW
#endif // NRN_ENABLE_ARCH_INDEP_EXP_POW
hoc_ret();
hoc_pushx(double(style));
}
Expand All @@ -161,7 +161,7 @@ void hoc_use_exp_pow_precision() {
// hopefully arch independent mpfr for exp and pow.

double hoc_pow(double x, double y) {
#if NRN_ARCH_INDEP_EXP_POW
#if NRN_ENABLE_ARCH_INDEP_EXP_POW
return (*pow_ptr)(x, y);
#else
return pow(x, y);
Expand All @@ -186,7 +186,7 @@ double hoc_Exp(double x) {
return exp(700.);
}

#if NRN_ARCH_INDEP_EXP_POW
#if NRN_ENABLE_ARCH_INDEP_EXP_POW
return (*exp_ptr)(x);
#else
return exp(x);
Expand Down

0 comments on commit 5fa9658

Please sign in to comment.