proxygen
|
Public Member Functions | |
ExecutionPipeline (const Predicate &pred, size_t nThreads) | |
~ExecutionPipeline () | |
void | stop () |
bool | write (Value &&value) |
void | blockingWrite (Value &&value) |
bool | read (Output &out) |
void | blockingRead (Output &out) |
Private Member Functions | |
void | predApplier () |
Private Attributes | |
std::vector< std::thread > | workers_ |
std::atomic< bool > | done_ {false} |
const Predicate & | pred_ |
MPMCPipeline< Input, Output > | pipeline_ |
EventCount | wake_ |
Definition at line 69 of file ParallelMap-inl.h.
|
inline |
Definition at line 77 of file ParallelMap-inl.h.
References i, and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::predApplier().
|
inline |
Definition at line 85 of file ParallelMap-inl.h.
References folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::done_, and folly::MPMCPipeline< In, Stages >::sizeGuess().
|
inline |
Definition at line 116 of file ParallelMap-inl.h.
References folly::MPMCPipeline< In, Stages >::blockingRead().
Referenced by folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::apply(), and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::foreach().
|
inline |
Definition at line 107 of file ParallelMap-inl.h.
References folly::MPMCPipeline< In, Stages >::blockingWrite(), folly::EventCount::notify(), and folly::value().
Referenced by folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::apply(), and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::foreach().
|
inlineprivate |
Definition at line 121 of file ParallelMap-inl.h.
References folly::EventCount::cancelWait(), folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::done_, folly::gen::move, folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::pred_, folly::EventCount::prepareWait(), ticket, and folly::EventCount::wait().
Referenced by folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::ExecutionPipeline().
|
inline |
Definition at line 112 of file ParallelMap-inl.h.
References folly::MPMCPipeline< In, Stages >::read().
Referenced by folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::apply(), and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::foreach().
|
inline |
Definition at line 93 of file ParallelMap-inl.h.
References folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::done_, and folly::EventCount::notifyAll().
Referenced by folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::apply(), and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::foreach().
|
inline |
Definition at line 99 of file ParallelMap-inl.h.
References folly::EventCount::notify(), folly::value(), and folly::MPMCPipeline< In, Stages >::write().
Referenced by folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::apply(), and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::foreach().
|
private |
Definition at line 71 of file ParallelMap-inl.h.
Referenced by folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::predApplier(), folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::stop(), and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::~ExecutionPipeline().
|
private |
Definition at line 73 of file ParallelMap-inl.h.
|
private |
Definition at line 72 of file ParallelMap-inl.h.
Referenced by folly::gen::detail::PMap< Predicate >::compose(), and folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::predApplier().
|
private |
Definition at line 74 of file ParallelMap-inl.h.
|
private |
Definition at line 70 of file ParallelMap-inl.h.