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. #云栖大会# 移动安全专场——APP加固新方向(演讲速记)

    主持人导语: 近些年来,移动APP数量呈现爆炸式的增长,黑产也从原来的PC端转移到了移动端,伴随而来的逆向攻击手段也越来越高明.在解决加固产品容易被脱壳的方案中,代码混淆技术是对抗逆向攻击最有效的方式 ...

  2. 在sqlserver2005/2008中备份数据库,收缩日志文件

    ---1.先备份数据库(含日志文件) use myhis go backup database myhis to disk='d:\myhis_rzbak' go ---2.设为简单恢复模式 use ...

  3. 江西省移动物联网发展战略新闻发布会举行-2017年10月江西IDC排行榜与发展报告

    编者按:当人们在做技术创新时,我们在做“外包产业“:当人们在做制造产业,我们在做”服务产业“:江人们在做AI智能时,我们在做”物联网“崛起,即使有一个落差,但红色热土从不缺少成长激情. 本期摘自上月初 ...

  4. commons-pool与commons-pool2连接池(Hadoop连接池)

    commons-pool和commons-pool2是用来建立对象池的框架,提供了一些将对象池化必须要实现的接口和一些默认动作.对象池化之后可以通过pool的概念去管理其生命周期,例如对象的创建,使用 ...

  5. Appium python自动化测试系列之appium环境搭建(二)

    ​2.1 基础环境搭建 当我们学习新的一项技术开始基本都是从环境搭建开始,本书除了第一章节也是的,如果你连最基础的环境都没有那么我们也没必要去说太多,大概介绍一下: 1.因为appium是支持andr ...

  6. 彻底区分html的attribute与dom的property

    当初在学html时始终没有弄清楚的关于attribute与property的区别,竟然在看angular文档时弄明白了. angular官方文档的数据绑定一节提到html attribute与dom ...

  7. leetcode 697. Degree of an Array

    题目: Given a non-empty array of non-negative integers nums, the degree of this array is defined as th ...

  8. IIC协议简介(笔记图片)

  9. wordpress 源代码 高亮显示 (Crayon Syntax Highlighter)

    作为码农,blog 里面不贴源代码像什么话,源代码没有高亮显示,那还怎么看!一番调研之后,Crayon Syntax Highlighter 可能是最流行,功能最强大的一款代码高亮插件了. 一.安装  ...

  10. LINUX 笔记-cp命令

    常用参数: -a :将文件的特性一起复制 -p :连同文件的属性一起复制,而非使用默认方式,与-a相似,常用于备份 -i :若目标文件已经存在时,在覆盖时会先询问操作的进行 -r :递归持续复制,用于 ...