Top Banner
PARALLEL PROCESSING FINAL PRESENTATION CILK Eliran Ben Moshe Neriya Cohen
20

Parallel Processing Final Presentation CILK

Jan 20, 2016

Download

Documents

Parallel Processing Final Presentation CILK. Eliran Ben Moshe Neriya Cohen. What is Cilk ?. G eneral-purpose  programming language designed for  multithreaded parallel computing . The C++  incarnation is called  Cilk Plus . - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Parallel Processing Final Presentation CILK

PARALLEL PROCESSING

FINAL PRESENTATION

CILKEliran Ben MosheNeriya Cohen

Page 2: Parallel Processing Final Presentation CILK

WHAT IS CILK? General-purpose programming

language designed for multithreaded parallel computing.

The C++ incarnation is called Cilk Plus.

The programmer should be responsible for exposing the parallelism, identifying elements that can safely be executed in parallel.

 The run-time environment, particularly the scheduler, decides during execution how to actually divide the work between processors.

Page 3: Parallel Processing Final Presentation CILK

CILK- HOW IT BEGAN? The Cilk language has been developed since

1994 at the MIT Laboratory for Computer Science.

 In July 2009, Intel Corporation acquired Cilk Arts, the Cilk++ technology and the Cilk trademark.

In 2010, Intel released a commercial implementation in its compilers combined with some data parallel constructs with the name Intel Cilk Plus.

Page 4: Parallel Processing Final Presentation CILK

CILK KEYWORDS

Spawn

Sync

Inlet

Abort

Page 5: Parallel Processing Final Presentation CILK

A SIMPLE EXAMPLE

int fib (int n) {if (n<2) return (n); else { int x,y; x = fib(n-1); y = fib(n-2); return (x+y); }}

int fib (int n) {if (n<2) return (n); else { int x,y; x = fib(n-1); y = fib(n-2); return (x+y); }}

cilk int fib (int n) { if (n<2) return (n); else { int x,y; x = spawn fib(n-1); y = spawn fib(n-2); sync; return (x+y); }}

cilk int fib (int n) { if (n<2) return (n); else { int x,y; x = spawn fib(n-1); y = spawn fib(n-2); sync; return (x+y); }}

Page 6: Parallel Processing Final Presentation CILK
Page 7: Parallel Processing Final Presentation CILK
Page 8: Parallel Processing Final Presentation CILK
Page 9: Parallel Processing Final Presentation CILK
Page 10: Parallel Processing Final Presentation CILK
Page 11: Parallel Processing Final Presentation CILK

WORK & SPAN Work ()- The total amount of processor time

required to complete the program is the sum of all the numbers.

Span (

Page 12: Parallel Processing Final Presentation CILK

PERFORMANCE

Parallelism - the average amount of work per step along the span.

Page 13: Parallel Processing Final Presentation CILK

STEALING

Page 14: Parallel Processing Final Presentation CILK

STEALING

Page 15: Parallel Processing Final Presentation CILK

EXAMPLE – QUICK SORT

Page 16: Parallel Processing Final Presentation CILK
Page 17: Parallel Processing Final Presentation CILK
Page 18: Parallel Processing Final Presentation CILK

SERIAL RECURSION

Page 19: Parallel Processing Final Presentation CILK

PARALLEL RECURSION

Page 20: Parallel Processing Final Presentation CILK