Skip to content

Commit

Permalink
Update submodule thread_pool
Browse files Browse the repository at this point in the history
  • Loading branch information
rvaser committed May 30, 2019
1 parent 447450d commit 2dfaad6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -march=native")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(THREADS_PREFER_PTHREAD_FLAG ON)

find_package(Threads REQUIRED)

add_executable(sword
src/chain.cpp
Expand All @@ -35,6 +32,6 @@ if (NOT TARGET thread_pool)
add_subdirectory(vendor/thread_pool EXCLUDE_FROM_ALL)
endif()

target_link_libraries(sword thread_pool Threads::Threads)
target_link_libraries(sword thread_pool)

install(TARGETS sword DESTINATION ${CMAKE_INSTALL_BINDIR})
4 changes: 2 additions & 2 deletions src/database_alignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void alignDatabase(std::vector<AlignmentSet>& dst, AlignmentType algorithm_,
std::vector<std::future<void>> thread_futures;

for (uint32_t i = 0; i < queries.size(); ++i) {
thread_futures.emplace_back(thread_pool->submit_task(scoreChains,
thread_futures.emplace_back(thread_pool->submit(scoreChains,
std::ref(dst[i]), std::ref(queries[i]), std::ref(indexes[i]),
std::ref(database), database_start, algorithm, max_evalue,
evalue_params, max_alignments, scorer));
Expand Down Expand Up @@ -269,7 +269,7 @@ void alignDatabase(std::vector<AlignmentSet>& dst, AlignmentType algorithm_,
std::vector<std::future<void>> thread_futures;

for (uint32_t i = 0; i < queries.size(); ++i) {
thread_futures.emplace_back(thread_pool->submit_task(alignChains,
thread_futures.emplace_back(thread_pool->submit(alignChains,
std::ref(dst[i]), std::ref(queries[i]), std::ref(database),
algorithm, scorer));
}
Expand Down
2 changes: 1 addition & 1 deletion src/database_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ uint64_t searchDatabase(Indexes& dst, const std::string& database_path,
std::vector<std::future<void>> thread_futures;

for (uint32_t i = 0; i < tasks.size() - 1; ++i) {
thread_futures.emplace_back(thread_pool->submit_task(scoreChains,
thread_futures.emplace_back(thread_pool->submit(scoreChains,
std::ref(entries), std::ref(entry_mutexes), max_candidates,
std::ref(queries), std::ref(database_part), tasks[i],
tasks[i + 1], kmers));
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "database_alignment.hpp"
#include "utils.hpp"

static const char* version = "v1.0.2";
static const char* version = "v1.0.3";

static struct option options[] = {
{"query", required_argument, 0, 'i'},
Expand Down
2 changes: 1 addition & 1 deletion vendor/thread_pool

0 comments on commit 2dfaad6

Please sign in to comment.