ParallelOpportunistic.cs
Go to the documentation of this file.
66 public static ParallelLoopResult For (int fromInclusive, int toExclusive, Action<int, ParallelLoopState> body)
78 public static ParallelLoopResult For (int fromInclusive, int toExclusive, ParallelOptions parallelOptions, Action<int> body)
90 public static ParallelLoopResult For (int fromInclusive, int toExclusive, ParallelOptions parallelOptions, Action<int, ParallelLoopState> body)
92 return For<object> (fromInclusive, toExclusive, parallelOptions, () => null, (i, s, l) => { body (i, s); return null; }, _ => { });
110 return For<TLocal> (fromInclusive, toExclusive, ParallelOptionsDefault, localInit, body, localFinally);
131 return Parallel.For (fromInclusive, toExclusive, parallelOptions, localInit, body, localFinally);
170 return new ParallelLoopResult (infos.LowestBreakIteration, !(infos.IsStopped || infos.IsExceptional));
175 static ParallelLoopResult ForEach<TSource, TLocal> (Func<int, IList<IEnumerator<TSource>>> enumerable, ParallelOptions options,
214 return new ParallelLoopResult (infos.LowestBreakIteration, !(infos.IsStopped || infos.IsExceptional));
224 public static ParallelLoopResult ForEach<TSource> (IEnumerable<TSource> source, Action<TSource> body)
245 public static ParallelLoopResult ForEach<TSource> (IEnumerable<TSource> source, Action<TSource, ParallelLoopState> body)
376 public static ParallelLoopResult ForEach<TSource> (IEnumerable<TSource> source, ParallelOptions parallelOptions,
399 public static ParallelLoopResult ForEach<TSource> (IEnumerable<TSource> source, ParallelOptions parallelOptions,
422 public static ParallelLoopResult ForEach<TSource> (OrderablePartitioner<TSource> source, ParallelOptions parallelOptions,
444 public static ParallelLoopResult ForEach<TSource> (Partitioner<TSource> source, ParallelOptions parallelOptions,
465 public static ParallelLoopResult ForEach<TSource> (Partitioner<TSource> source, ParallelOptions parallelOptions,
485 public static ParallelLoopResult ForEach<TSource, TLocal> (IEnumerable<TSource> source, Func<TLocal> localInit,
509 public static ParallelLoopResult ForEach<TSource, TLocal> (IEnumerable<TSource> source, Func<TLocal> localInit,
530 public static ParallelLoopResult ForEach<TSource, TLocal> (OrderablePartitioner<TSource> source, Func<TLocal> localInit,
534 return ForEach<TSource, TLocal> (source, ParallelOptions.Default, localInit, body, localFinally);
547 public static ParallelLoopResult ForEach<TSource, TLocal> (Partitioner<TSource> source, Func<TLocal> localInit,
551 return ForEach<TSource, TLocal> (source, ParallelOptions.Default, localInit, body, localFinally);
565 public static ParallelLoopResult ForEach<TSource, TLocal> (IEnumerable<TSource> source, ParallelOptions parallelOptions,
573 return ForEach<TSource, TLocal> (Partitioner.Create (source), parallelOptions, localInit, body, localFinally);
587 public static ParallelLoopResult ForEach<TSource, TLocal> (IEnumerable<TSource> source, ParallelOptions parallelOptions,
595 return ForEach<TSource, TLocal> (Partitioner.Create (source), parallelOptions, localInit, body, localFinally);
609 public static ParallelLoopResult ForEach<TSource, TLocal> (Partitioner<TSource> source, ParallelOptions parallelOptions,
619 return ForEach<TSource, TLocal> (source.GetPartitions, parallelOptions, localInit, body, localFinally);
633 public static ParallelLoopResult ForEach<TSource, TLocal> (OrderablePartitioner<TSource> source, ParallelOptions parallelOptions,
abstract IList< IEnumerator< KeyValuePair< long, TSource > > > GetOrderablePartitions(int partitionCount)
void ThrowIfCancellationRequested()
Definition: CancellationToken.cs:86
Opportunistically parallelize on platforms where supported.
Definition: ParallelOpportunistic.cs:29
Definition: AggregateException.cs:31
static void Invoke(params Action [] actions)
Invoke the specified actions.
Definition: ParallelOpportunistic.cs:656
static ParallelLoopResult For(int fromInclusive, int toExclusive, Action< int > body)
Parallel for loop.
Definition: ParallelOpportunistic.cs:55
static ParallelLoopResult For(int fromInclusive, int toExclusive, Action< int > body)
Definition: Parallel.cs:97
static bool SupportsParallelism
Gets or sets whether parallelism is supported.
Definition: ParallelOpportunistic.cs:39
static ParallelLoopResult For(int fromInclusive, int toExclusive, ParallelOptions parallelOptions, Action< int > body)
Parallel for loop.
Definition: ParallelOpportunistic.cs:78
static void Invoke(params Action[] actions)
Definition: Parallel.cs:673
Definition: IStructuralComparable.cs:33
static ParallelLoopResult ForEach< TSource >(IEnumerable< TSource > source, Action< TSource > body)
Parallel for each loop.
Definition: ParallelOpportunistic.cs:224
static ParallelLoopResult For(int fromInclusive, int toExclusive, ParallelOptions parallelOptions, Action< int, ParallelLoopState > body)
Parallel for loop.
Definition: ParallelOpportunistic.cs:90
Definition: Fiber.ContinueWith.cs:6
static ParallelLoopResult For< TLocal >(int fromInclusive, int toExclusive, Func< TLocal > localInit, Func< int, ParallelLoopState, TLocal, TLocal > body, Action< TLocal > localFinally)
Parallel for loop.
Definition: ParallelOpportunistic.cs:104
Definition: Parallel.cs:34
static ParallelLoopResult For(int fromInclusive, int toExclusive, Action< int, ParallelLoopState > body)
Parallel for loop.
Definition: ParallelOpportunistic.cs:66
Definition: AotInterlocked.cs:3
static void Invoke(ParallelOptions parallelOptions, params Action [] actions)
Invoke the specified actions.
Definition: ParallelOpportunistic.cs:669
CancellationToken CancellationToken
Definition: ParallelOptions.cs:45