util functions to get compile-time simd size and range check settings

This commit is contained in:
mhochsteger@cerbsim.com 2021-10-28 13:47:58 +02:00
parent 93e188688a
commit f0e7f843c3
2 changed files with 18 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#include "ngcore_api.hpp"
#include "utils.hpp"
#include "logging.hpp"
#include "simd_generic.hpp"
#ifndef WIN32
#include <cxxabi.h>
@ -95,5 +97,19 @@ namespace ngcore
int printmessage_importance = 0;
bool NGSOStream :: glob_active = true;
NGCORE_API int GetCompiledSIMDSize()
{
return GetDefaultSIMDSize();
}
NGCORE_API bool IsRangeCheckEnabled()
{
#ifdef NETGEN_ENABLE_CHECK_RANGE
return true;
#else
return false;
#endif
}
} // namespace ngcore

View File

@ -198,6 +198,8 @@ namespace ngcore
~MyLock () { mutex.unlock(); }
};
NGCORE_API int GetCompiledSIMDSize();
NGCORE_API bool IsRangeCheckEnabled();
} // namespace ngcore