Skip to content

Commit

Permalink
Merge pull request #1591 from finos/remove-tbb
Browse files Browse the repository at this point in the history
Remove TBB
  • Loading branch information
texodus authored Oct 24, 2021
2 parents a74343c + 7a65a43 commit 64bdfd7
Show file tree
Hide file tree
Showing 21 changed files with 52 additions and 403 deletions.
16 changes: 0 additions & 16 deletions cmake/TBB.txt.in

This file was deleted.

303 changes: 0 additions & 303 deletions cmake/modules/FindTBB.cmake

This file was deleted.

20 changes: 0 additions & 20 deletions cpp/perspective/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,6 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
include_directories( ${Boost_INCLUDE_DIRS} )
endif()

# TBB is a dependency that we can build as part of our build process, so it
# does not necessarily have to be present before Perspective is built.
find_package(TBB)

if(NOT TBB_FOUND)
psp_build_message("${Red}TBB could not be located - building TBB from external source ${ColorReset}")
psp_build_dep("tbb" "${PSP_CMAKE_MODULE_PATH}/TBB.txt.in")
else()
psp_build_message("${Cyan}Found TBB: TBB_INCLUDE_DIRS - ${TBB_INCLUDE_DIRS}, TBB_LIBRARY_DIRS - ${TBB_LIBRARY_DIRS} ${ColorReset}")
include_directories( ${TBB_INCLUDE_DIRS} )
endif()

if(WIN32)
foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd${warning}")
Expand Down Expand Up @@ -666,9 +654,6 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
# Link against minimal arrow static library
target_link_libraries(psp arrow)

target_link_libraries(psp tbb)
target_link_libraries(binding tbb)

target_link_libraries(binding psp)

# The compiled libraries will be put in CMAKE_LIBRARY_OUTPUT_DIRECTORY by default. In the
Expand All @@ -678,11 +663,6 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
add_custom_command(TARGET psp POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:psp> ${PSP_PYTHON_SRC}/table/)
add_custom_command(TARGET binding POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:binding> ${PSP_PYTHON_SRC}/table/)

if(WIN32)
if(NOT TBB_FOUND)
add_custom_command(TARGET binding POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:tbb> ${PSP_PYTHON_SRC}/table/)
endif()
endif()
########################
else()
add_library(psp SHARED ${WASM_SOURCE_FILES})
Expand Down
4 changes: 1 addition & 3 deletions cpp/perspective/src/cpp/arg_sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include <perspective/arg_sort.h>
#include <perspective/multi_sort.h>
#include <perspective/scalar.h>
#ifdef PSP_PARALLEL_FOR
#include <tbb/parallel_sort.h>
#endif

namespace perspective {

void
Expand Down
4 changes: 2 additions & 2 deletions cpp/perspective/src/cpp/context_grouped_pkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ t_ctx_grouped_pkey::rebuild() {

t_datumcmp cmp;

PSP_PSORT(data.begin(), data.end(), cmp);
std::sort(data.begin(), data.end(), cmp);

std::vector<t_uindex> root_children;

Expand Down Expand Up @@ -618,7 +618,7 @@ t_ctx_grouped_pkey::rebuild() {
}

#ifdef PSP_PARALLEL_FOR
tbb::parallel_for(0, int(naggs), 1,
parallel_for(int(naggs),
[&aggtable, &aggindices, &aggspecs, &tbl](int aggnum)
#else
for (t_uindex aggnum = 0; aggnum < naggs; ++aggnum)
Expand Down
Loading

0 comments on commit 64bdfd7

Please sign in to comment.