public static void Main(string[] args) { ParalellReduce.SumPrimeNumber_Reducer(); ProcessBooksWithMapReduce.Run(); WordsCounterDemo.Run(); Demo.PrintSeparator(); Console.WriteLine("parallel Reduce function implementation using Aggregate"); }
public static void Main(string[] args) { Console.WriteLine("WordCount"); WordsCounterDemo.Demo(); Demo.PrintSeparator(); Console.WriteLine("parallel Reduce function implementation using Aggregate"); int[] source = Enumerable.Range(0, 100000).ToArray(); int result = source.AsParallel() .Reduce((value1, value2) => value1 + value2); }