Skip to content

Commit 719d8a3

Browse files
guitargeekRoot Persona
authored andcommitted
Migrate from VecCore and Vc to std::experimental::simd
Use `std::experimental::simd` for the vectorized TMath and vectorized TFormula backend if available. We assume it's available if ROOT is compiled with C++20 or later on Linux. In reality, it is avialble for new-enough Clang and GCC compilers (GCC >= 11), but it is not worth it at this point to check the compiler version explicitly, to keep things simple. People who build with C++20 are also expected to use new compilers. The fact that ROOT C++17 users lose the vectorized TMath and TFormula features is an acceptable collateral damage of this migration, as the features are rarely used and the code/build system simplification is significant. If users really relied on these niche features, they are expected to build with C++20. Windows and Apple silicon users are unaffected by this migration. The VecCore+Vc combination did not compile on Windows before anyway, and Vc does not support Apple silicon as Vc didn't support vectorization on ARM via Neon (it was [in developement](https://github.com/VcDevel/Vc?tab=readme-ov-file#vc-portable-zero-overhead-c-types-for-explicitly-data-parallel-programming) but never finished). As a result of this migration, the `vc`, `veccore`, `builtin_vc`, and `builtin_veccore` build options are deprecated. The migration also fixes this long-standing JIRA issue about failing TFormula vectorization tests, because Vc symbols could not be resolved: https://its.cern.ch/jira/browse/ROOT-10614 This was a fundamental limitation of the statically-linked Vc library, as symbols could not be looked up by the interpreter at runtime. This limitation is gone with the migration to `std::experimental::simd`. The unit test that checks if GenVector works with Vc types was changed to use `std::experimental::simd` types instead.
1 parent 9f8a224 commit 719d8a3

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/Interpreter/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ set(LLVM_LINK_COMPONENTS
5858
${LLVM_TARGETS_TO_BUILD}
5959
)
6060

61-
if (vc)
62-
set(cling_vc_support ON)
63-
endif()
64-
6561
# clingInterpreter depends on Options.inc to be tablegen-ed
6662
# (target ClangDriverOptions) from in-tree builds.
6763
set(CLING_DEPENDS ClingDriverOptions)
@@ -375,10 +371,6 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cling-compiledata.h
375371
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/CIFactory.cpp
376372
APPEND PROPERTY OBJECT_DEPENDS
377373
${CMAKE_CURRENT_BINARY_DIR}/cling-compiledata.h)
378-
if(cling_vc_support)
379-
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/CIFactory.cpp
380-
APPEND PROPERTY COMPILE_DEFINITIONS "CLING_SUPPORT_VC")
381-
endif()
382374

383375
# If LLVM is external, but Clang is builtin, we must use some files
384376
# from patched (builtin) version of LLVM

0 commit comments

Comments
 (0)