Оцените презентацию от 1 до 5 баллов!
Тип файла:
ppt / pptx (powerpoint)
Всего слайдов:
53 слайда
Для класса:
1,2,3,4,5,6,7,8,9,10,11
Размер файла:
445.61 kB
Просмотров:
59
Скачиваний:
0
Автор:
неизвестен
Слайды и текст к этой презентации:
№1 слайд
Содержание слайда: Task Parallel Library
Data Parallelism Patterns
№2 слайд
Содержание слайда: Introduction to Parallel Programming
Introduction to Parallel Programming
Parallel Loops
Parallel Aggregation
№3 слайд
Содержание слайда: Introduction to Parallel Programming
Introduction to Parallel Programming
Parallel Loops
Parallel Aggregation
№4 слайд
Содержание слайда: Hardware trends predict more cores instead of faster clock speeds
Multicore system features
№5 слайд
Содержание слайда: Some parallel applications can be written for specific hardware
Potential parallelism
№6 слайд
Содержание слайда: Decomposition
Parallel programming patterns aspects
№7 слайд
Содержание слайда: Tasks are sequential operations that work together to perform a larger operation
Decomposition
№8 слайд
Содержание слайда: Tasks that are independent of one another can run in parallel
Coordination
№9 слайд
Содержание слайда: Tasks often need to share data
Scalable sharing of data
№10 слайд
Содержание слайда: Understand your problem or application and look for potential parallelism across the entire application as a whole
Parallel programming design approaches
№11 слайд
Содержание слайда: Concurrency is a concept related to multitasking and asynchronous input-output (I/O)
Concurrency & parallelism
№12 слайд
Содержание слайда: With parallelism, concurrent threads execute at the same time on multiple cores
Concurrency & parallelism
№13 слайд
Содержание слайда: Amdahl’s law says that no matter how many cores you have, the maximum speedup you can ever achieve is (1 / percent of time spent in sequential processing)
The limits of parallelism
№14 слайд
Содержание слайда: Whenever possible, stay at the highest possible level of abstraction and use constructs or a library that does the parallel work for you
Parallel programming tips
№15 слайд
Содержание слайда: Use patterns
Parallel programming tips
№16 слайд
Содержание слайда: Based on the .NET Framework 4
Code examples of this presentation
№17 слайд
Содержание слайда: Introduction to Parallel Programming
Introduction to Parallel Programming
Parallel Loops
Parallel Aggregation
№18 слайд
Содержание слайда: Parallel programming patterns
№19 слайд
Содержание слайда: Use the Parallel Loop pattern when you need to perform the same independent operation for each element of a collection or for a fixed number of iterations
Parallel Loops
№20 слайд
Содержание слайда: Parallel.For
№21 слайд
Содержание слайда: Parallel.ForEach
№22 слайд
Содержание слайда: Almost all LINQ-to-Objects expressions can easily be converted to their parallel counterpart by adding a call to the AsParallel extension method
Parallel LINQ (PLINQ)
№23 слайд
Содержание слайда: Use PLINQ’s ForAll extension method in cases where you want to iterate over the input values but you don’t want to select output values to return
PLINQ ForAll
№24 слайд
Содержание слайда: The .NET implementation of the Parallel Loop pattern ensures that exceptions that are thrown during the execution of a loop body are not lost
Exceptions
№25 слайд
Содержание слайда: Parallel loops
Parallel loops variations
№26 слайд
Содержание слайда: Writing to shared variables
Dependencies between loop iterations
№27 слайд
Содержание слайда: Referencing data types that are not thread safe
Dependencies between loop iterations
№28 слайд
Содержание слайда: Sequential iteration
Breaking out of loops early
№29 слайд
Содержание слайда: Use Break to exit a loop early while ensuring that lower-indexed steps complete
Parallel Break
№30 слайд
Содержание слайда: Calling Break doesn’t stop other steps that might have already started running
Parallel Break
№31 слайд
Содержание слайда: ParallelLoopResult
№32 слайд
Содержание слайда: Use Stop to exit a loop early when you don’t need all lower-indexed iterations to run before terminating the loop
Parallel Stop
№33 слайд
Содержание слайда: External Loop Cancellation
№34 слайд
Содержание слайда: Special handling of small loop bodies
№35 слайд
Содержание слайда: The number of ranges that will be created by a Partitioner object depends on the number of cores in your computer
Special handling of small loop bodies
№36 слайд
Содержание слайда: You usually let the system manage how iterations of a parallel loop are mapped to your computer’s cores, in some cases, you may want additional control
Controlling the degree of parallelism
№37 слайд
Содержание слайда: The PLINQ query in the code example will run with a maximum of eight tasks at any one time
Controlling the degree of parallelism
№38 слайд
Содержание слайда: Sometimes you need to maintain thread-local state during the execution of a parallel loop
Task-local state in a loop body
№39 слайд
Содержание слайда: Random initialization of the large array
№40 слайд
Содержание слайда: Calling the default Random constructor twice in short succession may use the same random seed
Random class in parallel
№41 слайд
Содержание слайда: You can substitute custom task scheduling logic for the default task scheduler that uses ThreadPool worker threads
Using a custom task scheduler
№42 слайд
Содержание слайда: Step size other than one
Anti-Patterns
№43 слайд
Содержание слайда: Adaptive partitioning
Parallel loops design notes
№44 слайд
Содержание слайда: Introduction to Parallel Programming
Introduction to Parallel Programming
Parallel Loops
Parallel Aggregation
№45 слайд
Содержание слайда: Parallel programming patterns
№46 слайд
Содержание слайда: The pattern is more general than calculating a sum
The Parallel Aggregation pattern
№47 слайд
Содержание слайда: Sequential version
Calculating a sum
№48 слайд
Содержание слайда: PLINQ
Calculating a sum
№49 слайд
Содержание слайда: PLINQ is usually the recommended approach
Parallel aggregation pattern in .NET
№50 слайд
Содержание слайда: The PLINQ Aggregate extension method includes an overloaded version that allows a very general application of the parallel aggregation pattern
Using PLINQ aggregation with range selection
№51 слайд
Содержание слайда: Aggregation using Parallel For and ForEach
Design notes
№52 слайд
Содержание слайда: Aggregation in PLINQ does not require the developer to use locks
Design notes
№53 слайд
Содержание слайда: Task Parallel Library
Data Parallelism Patterns