From 8ae2bc7698b32299a721eec0725260c3b3400b9d Mon Sep 17 00:00:00 2001
From: Axel Naumann <Axel.Naumann@cern.ch>
Date: Tue, 13 Apr 2021 16:11:39 +0200
Subject: [PATCH] [test] Remove testTBB:

we have lots of proper usage now, and it would need to be adapted
to current TBB not offering task_scheduler_init anymore.

(cherry picked from commit 1bb8f9a02f56afb67c836f969d6a9b4a68eb45ab)
---
 test/CMakeLists.txt |  8 --------
 test/testTBB.cxx    | 36 ------------------------------------
 2 files changed, 44 deletions(-)
 delete mode 100644 test/testTBB.cxx

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 7784470d57e..66511e61183 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -359,14 +359,6 @@ if(MSVC)
 endif()
 ROOT_ADD_TEST(test-TFormulaTests COMMAND TFormulaTests FAILREGEX "FAILED|Error in")
 
-#--TBB basic test----------------------------------------------------------------------------------
-if(ROOT_imt_FOUND)
-  include_directories(${TBB_INCLUDE_DIRS})
-  ROOT_EXECUTABLE(testTBB testTBB.cxx LIBRARIES ${TBB_LIBRARIES} BUILTINS TBB)
-  set_target_properties(testTBB PROPERTIES COMPILE_FLAGS "${TBB_CXXFLAGS}")
-  ROOT_ADD_TEST(test-TBB COMMAND testTBB FAILREGEX "FAILED|Error in")
-endif()
-
 #--Vc basic test-----------------------------------------------------------------------------------
 if(ROOT_vc_FOUND)
   ROOT_EXECUTABLE(testVc testVc.cxx LIBRARIES ${Vc_LIBRARIES} BUILTINS Vc)
diff --git a/test/testTBB.cxx b/test/testTBB.cxx
deleted file mode 100644
index 1f7cb9acf5c..00000000000
--- a/test/testTBB.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "tbb/parallel_for.h"
-#include "tbb/task_scheduler_init.h"
-#include <iostream>
-#include <vector>
-
-struct mytask {
-   mytask(size_t n)
-   :_n(n)
-   {}
-   void operator()() {
-      for (int i=0;i<1000000;++i) {}  // Deliberately run slow
-      std::cerr << "[" << _n << "]";
-   }
-   size_t _n;
-};
-
-int main(int,char**) {
-
-   //tbb::task_scheduler_init init;  // Automatic number of threads
-   tbb::task_scheduler_init init(tbb::task_scheduler_init::default_num_threads());  // Explicit number of threads
-
-   std::vector<mytask> tasks;
-   for (int i=0;i<1000;++i)
-      tasks.push_back(mytask(i));
-
-   tbb::parallel_for(
-                     tbb::blocked_range<size_t>(0,tasks.size()),
-                     [&tasks](const tbb::blocked_range<size_t>& r) {
-                        for (size_t i=r.begin();i<r.end();++i) tasks[i]();
-                     }
-                     );
-   
-   std::cerr << std::endl;
-   
-   return 0;
-}
-- 
GitLab