summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-25 18:57:07 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-25 18:57:07 +0300
commitcd8ef301f4796f15390d02d866ad88423b2d8d16 (patch)
treed13861b26c64424db480b0a26b9d3879e0b39023
parent8b4f7726187221800a2fb7e5efdae998bf6ebfb1 (diff)
downloadmanaverse-cd8ef301f4796f15390d02d866ad88423b2d8d16.tar.gz
manaverse-cd8ef301f4796f15390d02d866ad88423b2d8d16.tar.bz2
manaverse-cd8ef301f4796f15390d02d866ad88423b2d8d16.tar.xz
manaverse-cd8ef301f4796f15390d02d866ad88423b2d8d16.zip
Fix compilation without simd support.
-rw-r--r--src/test/testlauncher.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 17b4809ed..24188f6ed 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -503,6 +503,7 @@ static void calcTime(const char *const msg1,
printf("%s: %011ld\n", msg2, diff);
}
+#ifdef SIMD_SUPPORTED
#define runDyeTest(msg1, msg2, func) \
initBuffer(buf, sz); \
pal.func(buf, sz); \
@@ -514,12 +515,13 @@ static void calcTime(const char *const msg1,
time1, \
time2, \
buf)
-
+#endif // SIMD_SUPPORTED
#endif // defined __linux__ || defined __linux
int TestLauncher::testDyeSSpeed()
{
#if defined __linux__ || defined __linux
+#ifdef SIMD_SUPPORTED
const int sz = 100000;
uint32_t buf[sz];
timespec time1;
@@ -530,6 +532,7 @@ int TestLauncher::testDyeSSpeed()
runDyeTest("dye s salt", "default time", replaceSColorDefault);
runDyeTest("dye s salt", "sse2 time ", replaceSColorSse2);
runDyeTest("dye s salt", "avx2 time ", replaceSColorAvx2);
+#endif // SIMD_SUPPORTED
#endif // defined __linux__ || defined __linux
return 0;
}
@@ -537,6 +540,7 @@ int TestLauncher::testDyeSSpeed()
int TestLauncher::testDyeASpeed()
{
#if defined __linux__ || defined __linux
+#ifdef SIMD_SUPPORTED
const int sz = 100000;
uint32_t buf[sz];
timespec time1;
@@ -547,6 +551,7 @@ int TestLauncher::testDyeASpeed()
runDyeTest("dye a salt", "default time", replaceAColorDefault);
runDyeTest("dye a salt", "sse2 time ", replaceAColorSse2);
runDyeTest("dye a salt", "avx2 time ", replaceAColorAvx2);
+#endif // SIMD_SUPPORTED
#endif // defined __linux__ || defined __linux
return 0;
}