diff --git a/app/benchmark_fft/main.cpp b/app/benchmark_fft/main.cpp index aa21658..6b41c52 100644 --- a/app/benchmark_fft/main.cpp +++ b/app/benchmark_fft/main.cpp @@ -80,7 +80,7 @@ int main() { pls::internal::helpers::run_mini_benchmark([&] { complex_vector input = initial_input; fft(input.begin(), input.size()); - }, 8, 1000); + }, 7, 30000); PROFILE_SAVE("test_profile.prof") } diff --git a/lib/pls/include/pls/internal/base/system_details.h b/lib/pls/include/pls/internal/base/system_details.h index 17b51d7..01543c0 100644 --- a/lib/pls/include/pls/internal/base/system_details.h +++ b/lib/pls/include/pls/internal/base/system_details.h @@ -2,10 +2,19 @@ #ifndef PLS_SYSTEM_DETAILS_H #define PLS_SYSTEM_DETAILS_H -#include -#if (COMPILER == MVCC) -#include +#if MSVC +#ifdef _M_X86 +#define ARCH_X86 +#endif +#endif + +#if GCC +#ifdef __i386__ +#define ARCH_X86 #endif +#endif + +#include namespace pls { namespace internal { @@ -53,7 +62,9 @@ constexpr pointer_t CACHE_LINE_SIZE = 64; * Choose the implementation appropriate for your compiler-cpu combination. */ inline void relax_cpu() { +#ifdef ARCH_X86 asm volatile("pause":: : "memory"); +#endif } }