Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(base): fix comment for parallelized mapping #147

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading