Skip to content

Commit

Permalink
Merge pull request #147 from kroma-network/chore/fix-comment-for-para…
Browse files Browse the repository at this point in the history
…llelize

chore(base): fix comment for parallelized mapping
  • Loading branch information
chokobole committed Nov 2, 2023
2 parents be5eddc + 4524d7a commit ddad613
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tachyon/base/parallelize.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ void Parallelize(ContainerTy& container, Callable callback,
std::move(callback));
}

// Splits the |container| by |chunk_size| and executes |callback| in parallel.
// Splits the |container| by |chunk_size| and maps each chunk using the provided
// |callback| in parallel. Each callback's return value is collected into a
// vector which is then returned.
// See parallelize_unittest.cc for more details.
template <typename ContainerTy, typename Callable,
typename FunctorTraits = internal::MakeFunctorTraits<Callable>,
Expand Down Expand Up @@ -84,7 +86,9 @@ std::vector<ReturnType> ParallelizeMapByChunkSize(ContainerTy& container,
return values;
}

// Splits the |container| into threads and executes |callback| in parallel.
// Splits the |container| into threads and maps each chunk using the provided
// |callback| in parallel. The results from each callback are collected into a
// vector and returned.
// See parallelize_unittest.cc for more details.
template <typename ContainerTy, typename Callable>
auto ParallelizeMap(ContainerTy& container, Callable callback,
Expand Down

0 comments on commit ddad613

Please sign in to comment.