Blob Blame History Raw
--- ugene-40.1/src/plugins/smith_waterman/src/SWAlgorithmPlugin.cpp.sse_2	2021-11-11 15:42:19.590500062 +0900
+++ ugene-40.1/src/plugins/smith_waterman/src/SWAlgorithmPlugin.cpp	2021-11-11 15:42:26.384496818 +0900
@@ -90,13 +90,15 @@
     swar->registerFactory(new SWTaskFactory(SW_classic), QString("Classic 2"));  // ADV search register
     par->registerAlgorithm(new SWPairwiseAlignmentAlgorithm());
 
+#if defined (__SSE2__)
     coreLog.trace("Registering SSE2 SW implementation");
     swar->registerFactory(new SWTaskFactory(SW_sse2), QString("SSE2"));
     par->getAlgorithm("Smith-Waterman")
         ->addAlgorithmRealization(
             new PairwiseAlignmentSmithWatermanTaskFactory(SW_sse2),
             new PairwiseAlignmentSmithWatermanGUIExtensionFactory(SW_sse2),
             "SSE2");
+#endif
 }
 
 QList<XMLTestFactory*> SWAlgorithmTests::createTestFactories() {
--- ugene-40.1/src/plugins/smith_waterman/src/SWAlgorithmTask.cpp.sse_2	2021-11-11 15:42:19.590500062 +0900
+++ ugene-40.1/src/plugins/smith_waterman/src/SWAlgorithmTask.cpp	2021-11-11 15:46:26.960369309 +0900
@@ -146,6 +146,7 @@
                                                                         sWatermanConfig.sqnc.left(c.chunkSize * c.nThreads),
                                                                         sWatermanConfig.resultView);
             break;
+#ifdef __SSE2__
         case SW_sse2:
             neededRam = SmithWatermanAlgorithmSSE2::estimateNeededRamAmount(sWatermanConfig.ptrn,
                                                                             sWatermanConfig.sqnc.left(c.chunkSize * c.nThreads),
@@ -154,6 +155,7 @@
                                                                             minScore,
                                                                             maxScore,
                                                                             sWatermanConfig.resultView);
+#endif
             break;
         default:
             assert(0);
@@ -182,7 +184,12 @@
 
     SmithWatermanAlgorithm* sw = nullptr;
     if (algType == SW_sse2) {
+#if defined(__SSE2__)
         sw = new SmithWatermanAlgorithmSSE2;
+#else
+        coreLog.error("SSE2 was not enabled in this build");
+        return;
+#endif
     } else {
         assert(algType == SW_classic);
         sw = new SmithWatermanAlgorithm;
@@ -458,7 +465,11 @@
 
     SmithWatermanAlgorithm* sw = nullptr;
     if (algType == SW_sse2) {
+#if defined(__SSE2__)
         sw = new SmithWatermanAlgorithmSSE2;
+#else
+        coreLog.error("SSE2 was not enabled in this build");
+#endif
     } else {
         assert(algType == SW_classic);
         sw = new SmithWatermanAlgorithm;
@@ -582,6 +593,7 @@
                                                                         sqnc->left(c.chunkSize * c.nThreads),
                                                                         SmithWatermanSettings::MULTIPLE_ALIGNMENT);
             break;
+#ifdef __SSE2__
         case SW_sse2:
             neededRam = SmithWatermanAlgorithmSSE2::estimateNeededRamAmount(*ptrn,
                                                                             sqnc->left(c.chunkSize * c.nThreads),
@@ -590,6 +602,7 @@
                                                                             minScore,
                                                                             maxScore,
                                                                             SmithWatermanSettings::MULTIPLE_ALIGNMENT);
+#endif
             break;
         default:
             assert(0);
--- ugene-40.1/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.cpp.sse_2	2021-11-11 15:42:19.591500062 +0900
+++ ugene-40.1/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.cpp	2021-11-11 15:42:26.385496818 +0900
@@ -19,6 +19,7 @@
  * MA 02110-1301, USA.
  */
 
+#if defined(__SSE2__)
 #include <emmintrin.h>
 #include <iostream>
 
@@ -1210,3 +1211,4 @@
 }
 
 }  // namespace U2
+#endif
--- ugene-40.1/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.h.sse_2	2021-11-11 15:42:19.592500061 +0900
+++ ugene-40.1/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.h	2021-11-11 15:42:26.385496818 +0900
@@ -22,6 +22,7 @@
 #ifndef _SMITHWATERMANALGORITHM_SSE2_H
 #define _SMITHWATERMANALGORITHM_SSE2_H
 
+#if defined(__SSE2__)
 #include <emmintrin.h>
 
 #include "SmithWatermanAlgorithm.h"
@@ -55,3 +56,4 @@
 }  // namespace U2
 
 #endif
+#endif