Moving Beyond Threads Parallel Programming in Cpp US
Transcript of Moving Beyond Threads Parallel Programming in Cpp US
![Page 1: Moving Beyond Threads Parallel Programming in Cpp US](https://reader031.fdocuments.us/reader031/viewer/2022021200/577d225e1a28ab4e1e97342d/html5/thumbnails/1.jpg)
8/3/2019 Moving Beyond Threads Parallel Programming in Cpp US
http://slidepdf.com/reader/full/moving-beyond-threads-parallel-programming-in-cpp-us 1/3
MGB 2005 1/22/2012 2:37 PM
© 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 1
Visual Studio 2010Visual Studio 2010Concurrency RuntimeConcurrency Runtime
Dana Groff and Rick MolloyProgram ManagersParallel ComputingMicrosoft
CaveatsCaveatsThis is a C++ talk
Visual Studio 2010 on Windows
Xbox availability is undetermined
We will briefly cover the concepts
Dive into applying those concepts
AgendaAgendaDefine (15 minutes)
Concurrency Runtime Architecture
Concepts
Demonstrate (30 minutes)
Review (5 minutes)
Productivity:
Make it easier to express parallelism
Make it easier to debug parallel code
Reduce the likelihood of making errors
Performance:
Reduce runtime overhead to enable fine-grained parallelism
Scale on any hardware platform without explicitly coding tothe platform
Why?Why? Concurrency for C++Concurrency for C++
Parallel Pattern LibraryParallel Pattern Library
Resource ManagerResource Manager
Task SchedulerTask Scheduler
ThreadsThreadsWindowsWindows
Native Concurrency RuntimeNative Concurrency Runtime
D a t a
S t r u c t u r e s
D a t a
S t r u c t u r e s
AsynchronousAsynchronous
AgentsAgentsLibraryLibrary
UMS ThreadsUMS Threads
Native LibrariesNative Libraries
KeyKey:: VisualStudio 2010Visual Studio 2010 Windows 7Windows 7
ToolsTools
Visual Studio 2010Visual Studio 2010
ParallelParallel
DebuggerDebugger
ProfilerProfiler
ConcurrencyConcurrency
AnalysisAnalysis
![Page 2: Moving Beyond Threads Parallel Programming in Cpp US](https://reader031.fdocuments.us/reader031/viewer/2022021200/577d225e1a28ab4e1e97342d/html5/thumbnails/2.jpg)
8/3/2019 Moving Beyond Threads Parallel Programming in Cpp US
http://slidepdf.com/reader/full/moving-beyond-threads-parallel-programming-in-cpp-us 2/3
![Page 3: Moving Beyond Threads Parallel Programming in Cpp US](https://reader031.fdocuments.us/reader031/viewer/2022021200/577d225e1a28ab4e1e97342d/html5/thumbnails/3.jpg)
8/3/2019 Moving Beyond Threads Parallel Programming in Cpp US
http://slidepdf.com/reader/full/moving-beyond-threads-parallel-programming-in-cpp-us 3/3
MGB 2005 1/22/2012 2:37 PM
© 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 3
Asynchronous Agents LibraryAsynchronous Agents Library
Message Blocks unbounded_buffer<T>
overwrite_buffer<T>
single_assignment<T>
Message Blocks unbounded_buffer<T>
overwrite_buffer<T>
single_assignment<T>
Pipelining tasks transformer<T,U>
call<T>
Pipelining tasks transformer<T,U>
call<T>
Message Control
choice join
Message Control
choice join
Message Passing
send() / asend() receive()
co-operatively block if needed
Message Passing
send() / asend() receive()
co-operatively block if needed
Sample PackSample Packhttp://http://code.msdn.microsoft.com/concrtextrascode.msdn.microsoft.com/concrtextrasAgents Extras
priority_buffer
bounded_buffer
alternator
join_transform
Agents Extras
priority_buffer
bounded_buffer
alternator
join_transform
PPL Extras
parallel_all_of, parallel_any_of,parrallel_none_of
parallel_for_fixed, parallel_for_each_fixed
parallel_accumulate, parallel_transform
parallel_partial_sum, parallel_partial_sum_fixed
PPL Extras
parallel_all_of, parallel_any_of,parrallel_none_of
parallel_for_fixed, parallel_for_each_fixed
parallel_accumulate, parallel_transform
parallel_partial_sum, parallel_partial_sum_fixed
Helper Functions
task_scheduler, schedule_group
scoped_oversubcription_token
countdown_event
Barrier
Helper Functions
task_scheduler, schedule_group
scoped_oversubcription_token
countdown_event
Barrier
Coming Soon
concurrent_unordered_map
concurrent_unordered_set
concurrent_hash
parallel_sort,connect
More demos
Coming Soon
concurrent_unordered_map
concurrent_unordered_set
concurrent_hash
parallel_sort,connect
More demos
SummarySummaryUse Concurrency Runtime so you can focus on scalingyour algorithms and not the plumbing
Start ́ thinkingµ with parallel patterns
Agents, message blocks, and controls allow you to naturallyexpress data flow that avoids shared state
Loops and searches may be good candidates for parallelizationwww.microsoftgamefest.com
©2009-2010 Microsoft Corporation.Allrights reserved.Thispresentationis forinformationalpurposes only. Microsoftmakesno warranties, expressorimplied, inthissummary.