The .NET Framework 4 includes significant advancements for developers writing parallel and concurrent applications, including Parallel LINQ (PLINQ), the Task Parallel Library (TPL), new thread-safe collections, and a variety of new coordination and synchronization data structures.

This sample includes example applications and library functionality that demonstrate, utilize, and augment this support (it is not production quality). This sample is a single .zip containing a single Visual Studio .sln file, which then contains multiple Visual Studio projects that highlight key capabilities provided by the .NET Framework 4 and the parallel programming support it provides. Below are descriptions of the included examples.

(For discussions of Parallel Extensions and/or these samples, visit the forums athttp://social.msdn.microsoft.com/Forums/en-US/parallelextensions/threads. For documentation on the parallelism constructs in .NET 4, seehttp://msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx. For information direct from the Parallel Extensions team, subscribe to the team blog athttp://blogs.msdn.com/pfxteam. For videos/articles on parallelism and Parallel Extensions, visit the Parallel Computing Developer Center athttp://msdn.com/concurrency.)

Project Name: AcmePizza          Languages: C#, Visual Basic          Description: This simple and somewhat silly application demonstrates using concurrent collections with WPF.  The collections are wrapped with observable facades, such that multiple threads may modify the collections concurrently, and those updates are safely propagated to UI controls.         
Project Name: Antisocial Robots          Languages: C#          Description: Demonstrates doing a computationally-intensive operation many times per second, as a bunch of “robots” try to get as far away from each other as possible.         
Project Name: BabyNames          Languages: C#, Visual Basic          Description: This is one of the first applications we ever built to use Parallel LINQ.  Using LINQ and PLINQ, it queries a data set of baby name popularity information, sorts the results, and displays the results in a simplistic WPF user interface.          
Project Name: BlendImages          Languages: C#          Description: A demo of very simple image manipulation using a Parallel.For loop.  The application allows the user to load up two images and blends them together into a single, new image.         
Project Name: Boids         Languages: C#         Description: An implementation of a classic flocking algorithm, utilizing WPF for pretty 3D visualization of the “boids”, whose next positions and velocities are computing in parallel.        
Project Name: ComputePi          Languages: C#, Visual Basic          Description: A console application that estimates the value of PI using a variety of both serial and parallel implementations, the latter done with both PLINQ and the Parallel class.
Project Name: DiningPhilosophers          Languages: C#, Visual Basic          Description: A WPF application that demonstrates the classic “Dining Philosophers” synchronization problem.  The application implements several solutions, including one based on asynchronous techniques using Tasks.
Project Name: EditDistance          Languages: C#, Visual Basic          Description: A console application that uses Tasks to parallelize a dynamic programming problem, that of computing the “edit distance” between two strings.         
Project Name: GameOfLife          Languages: C#, Visual Basic          Description: This application provides an implementation of Conway’s Game of Life, using the Parallel class to parallelize the processing of the cellular automata.
Project Name: ImageColorizer          Languages: C#, Visual Basic          Description: This application manipulates an image by converting the majority of the image to grayscale, except for portions of the image containing user-selected hues.
Project Name: LINQRayTracer          Languages: C#, Visual Basic          Description: Based on Luke Hoban’s LINQ implementation of a ray tracer, this application parallelizes a computationally intensive LINQ query using PLINQ.
Project Name: MandelbrotFractals          Languages: C#, C++/CLI          Description: This application provides an implementation of the classicMandelbrot fractal, parallelizing the processing of the fractal using the Parallel class.
Project Name: Morph          Languages: C#          Description: Implements a morphing algorithm between two images.  Parallelization is done using the Parallel class.
Project Name: NBodySimulation         Languages: C#, F#         Description: Implements a classic n-body simulation using C# and WPF for the UI and using F# for the core computation. Parallelism is achieved using the Parallel class.        
Project Name: NQueens          Languages: C#, Visual Basic          Description: This application implements a solution to the N-Queens problem, using both LINQ and PLINQ.
Project Name: OptionPricing          Languages: C#, Visual Basic          Description: This Excel VSTO application utilizes PLINQ to price Asian Options.          
Project Name: ParallelGrep          Languages: C#, Visual Basic          Description: This console application implements “grep” functionality across a file system using PLINQ.
Project Name: PlinqKnobs         Languages: C#         Description: A simple console application that demonstrates some of the ways execution of a PLINQ query may be controlled and configured.        
Project Name: Raytracer          Languages: C#, Visual Basic, F#          Description: This Windows application provides an animated, ray-traced bouncing ball.  Sequential and parallel implementations are provided, as is a special parallel implementation that colors the animated image based on which thread was used to calculate which regions.
Project Name: Raytracer         Languages: C#     Description: This WPF application is a Reversi game.  The AI algorithms are minimax with alpha-beta pruning, and the parallel AI (light player) uses Tasks and CancellationTokens to achieve speedup via parallelism.
Project Name: ShakespeareanMonkeys          Languages: C#, Visual Basic          Description: This application implements and parallelizes a genetic algorithm for breeding monkeys able to speak text from Hamlet.
Project Name: SpellChecker          Languages: C#, Visual Basic          Description: This application implements and parallelizes a spellchecking algorithm based on the same edit distance calculation in the Edit Distance sample.
Project Name: Strassens          Languages: C#          Description: This application implements several algorithms for performing and parallelizing matrix multiplication, including theStrassen algorithm.
Project Name: Sudoku          Languages: C#, Visual Basic          Description: This is a fun application that provides a full Sudoku experience, including on-demand puzzle generation and solving.  Unlike many Sudoku demos which parallelize the solver, this implementation parallelizes the generator, using PLINQ.  It also demonstrates a use for speculative execution.
Project Name: VisualizePartitioning          Languages: C#, Visual Basic          Description: This application demonstrates various approaches to partitioning as employed by both Parallel and PLINQ.
Project Name: ParallelExtensionsExtras Languages: C#          Description: This class library provides a plethora of interesting and useful extensions to take advantage of and complement the functionality available in the .NET Framework 4 for parallel programming.

Samples for Parallel Programming with the .NET Framework的更多相关文章

  1. Task Cancellation: Parallel Programming

    http://beyondrelational.com/modules/2/blogs/79/posts/11524/task-cancellation-parallel-programming-ii ...

  2. Introduction to Multi-Threaded, Multi-Core and Parallel Programming concepts

    https://katyscode.wordpress.com/2013/05/17/introduction-to-multi-threaded-multi-core-and-parallel-pr ...

  3. Fork and Join: Java Can Excel at Painless Parallel Programming Too!---转

    原文地址:http://www.oracle.com/technetwork/articles/java/fork-join-422606.html Multicore processors are ...

  4. Notes of Principles of Parallel Programming - TODO

    0.1 TopicNotes of Lin C., Snyder L.. Principles of Parallel Programming. Beijing: China Machine Pres ...

  5. 4.3 Reduction代码(Heterogeneous Parallel Programming class lab)

    首先添加上Heterogeneous Parallel Programming class 中 lab: Reduction的代码: myReduction.c // MP Reduction // ...

  6. Parallel Programming for FPGAs 学习笔记(1)

    Parallel Programming for FPGAs 学习笔记(1)

  7. 论文笔记:Parallel Tracking and Verifying: A Framework for Real-Time and High Accuracy Visual Tracking

    Parallel Tracking and Verifying: A Framework for Real-Time and High Accuracy Visual Tracking  本文目标在于 ...

  8. Parallel Programming AND Asynchronous Programming

    https://blogs.oracle.com/dave/ Java Memory Model...and the pragmatics of itAleksey Shipilevaleksey.s ...

  9. A Pattern Language for Parallel Programming

    The pattern language is organized into four design spaces.  Generally one starts at the top in the F ...

随机推荐

  1. riot.js教程【一】简介

    Riotjs简介 Riotjs是一款简单的.优雅的.组件化UI前端开发框架: 他支持自定义标签(custom tags),拥有令人愉悦的语法,优雅的API和非常小的体积: 为什么需要一个新的界面库 前 ...

  2. Virgo标签打印

    去年刚换新的公司,熟悉新的业务和代码,在修改公司打印标签的时候,感觉到无比烦躁与头痛.只因为不好维护,所有的标签打印,全部是GDI+绘制,每次修改微调,都只能全部运行才能看到效果.程序过大,编译过慢, ...

  3. Windows系统下使用Jenkins 自动发布 .NET core到Linux平台下Docker

    准备工作(安装过程可以百度,已安装的可以跳过) a)     安装Jenkins,安装包下载地址:http://mirrors.tuna.tsinghua.edu.cn/jenkins/windows ...

  4. Python学习笔记(九)

    Python学习笔记(九): 装饰器(函数) 内置函数 1. 装饰器 1. 作用域 2. 高阶函数 3. 闭包 如果在一个内部函数里,对在外部作用域(但不是在全局作用域)的变量进行引用,那么内部函数就 ...

  5. Android基础知识笔记01—框架结构与四大组件

    -----------Andriod 01--------------->>> Andriod系统架构    linux内核与驱动层. 系统运行库层. 应用框架层. 应用层 内核驱动 ...

  6. redis基本教程

    http://www.runoob.com/redis/redis-tutorial.html

  7. 读阮一峰老师 es6 入门笔记 —— 第一章

    鉴于最近用 vuejs 框架开发项目,其中有很多涉及到 es6 语法不太理解所以便认真地读了一下这本书. 地址:http://es6.ruanyifeng.com/#README 第一章:let ,c ...

  8. Java限流策略

    概要 在大数据量高并发访问时,经常会出现服务或接口面对暴涨的请求而不可用的情况,甚至引发连锁反映导致整个系统崩溃.此时你需要使用的技术手段之一就是限流,当请求达到一定的并发数或速率,就进行等待.排队. ...

  9. Java Swing学习

    在Java学习的过程中,我们时常会因为控制台程序的枯燥而失去了学习Java的乐趣,那么今天我们就开始学习Java的Swing.也就是GUI(Graphical user interface),在应用到 ...

  10. LeetCode 62. Unique Paths(所有不同的路径)

    A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The ...