SlideShare a Scribd company logo
INTRODUCTION TO
MANYCORE PROGRAMMING

     Francisco Dios Buitrago, 70020
     Jesus Carabaño Bravo, 70014
     Maziar Mehrabi, 36916
     Junaid Iqbal, 36785
     Hesam Zolfaghari, 85271
2   Objective
    To develop scalable solution of Libpuzzle
    using Intel® Cilk™ Plus.
Our Team's Approach(s)
3




                                                            Unlimited
                                                       Processors/Memory

                        Read P1   Sign P1   Match P1



                        . . . . . . . . . . .
                        .
                        . . . . . . . . . . . .
     Read
    Ref.Pic
               Sign
              Ref.Pic
                        .                                      Sort (Top 10)

                        . . . . . . . . . . . .
                        .
                        . . . . . . . . . . . .
                        .
                        Read Pn   Sign Pn   Match Pn

     Simultaneous
        Reads
Our Team's Approach(s)
4




    MI=f1(Fref)                M1=f1(F1)                M2=f1(F2)          …           Mn=f1(Fn)




                                               V1=f2(M1)                V2=f2(M2)               …             Vn=f2(Mn)


                      VI=f2(Mref)



                                                                D1=f3(Vref,V1)               D2=f3(Vref,V2)         …      Dn=f3(Vref,Vn)




                                             Considering Mutex
                                                                                    f4(D1)                        f4(D2)        …           f4(Dn)




            Legend – f1: loads files into memory, f2: computes the signature of a picture, f3: matches two signatures, f4: inserts in the top
Bird’s Eye View (Practical Approach)
5



                                                                     Tasks


                        Ref                    Set of Pic(s)
                        Pic.

    Ref. Pic Load and          Load, Sign &    Load , Sign     Load, Sign &                 Load, Sign
           Sign                  Match 1       & Match 2         Match 3         …...      and Match n



                                       Spawn

                               Spawning                                       Insert TOP
          Start
                                 Loop




                                                                       Print
                                                                     (Top Ten)
Signature Calculation
6



    Conversion from color to            Mean of every square
    gray is done in parallel,           is done in parallel,
    pixel by pixel                      square by square.




      Mean of a simple square is
      done with a reduction, pixel
      grain

      Mean of a simple pixel with his
      neighbors is done with a
      reduction, neighbor grain
Signature Calculation
7




     Difference of every square with his     Threshold of the signature is done in
     neighbors is done in parallel, square   parallel, element by element.
     by square
Matching
8




    The difference of two signatures is     The Euclidean length is done with a
    done in parallel, element by element.   reduction, element grain.
                                            The Euclidean length of every vector is
                                            done in parallel, vector by vector
Summary
9


       Signature
           Every whole picture processing is done in parallel, picture by picture.
           The conversion from color to gray is done in parallel, pixel by pixel.
           The mean of every square is done in parallel, square by square.
           The mean of a simple square is done with a reduction, pixel grain.
           The mean of a simple pixel with his neighbors is done with a reduction, neighbor grain.
           The difference of every square with his neighbors is done in parallel, square by square.
           The difference process on a simple square is done in parallel, neighbor by neighbor.
           The thresholding of the signature is done in parallel, element by element.

       Matching
           The difference of two signatures is done in parallel, element by element.
           The Euclidean length is done with a reduction, element grain.
           The Euclidean length of every vector is done in parallel, vector by vector.
Benchmarking
10



          Practical code Practical code Theoretical code
Picture
          Practical Flow Theoretical Flow Practical Flow                       CilkView Results
     0          16                -                  -      25.00

     1         578                -                  -                                                                              21.85
                                                            20.00
     2        1,591               -                2,808

     3        4,976             7,519              5,834                                                                16
                                                            15.00
     4        7,878               -                  -

     5        44,632           60,622             319,662   10.00
                                                                                                                        8.92        8.92
                                                                                                        8
                                                                                                        8.00
                                                                                                        7.50            7.50        7.50
                      Time in Milliseconds
                                                             5.00
                                                                                       4
                                                                                       4.00             4.03            4.03        4.03
             Picture Sets vs Ref. Picture                               2.00
                                                                        2
                                                             0.00
                                      Time (ms)                     2              4                8              16          32

         Small Picture Set               2,496                                                 Processors
                                                                               Picture 0 : : Practical code, Practical Flow
                                                                               Picture 2: : Practical code, Practical Flow
     Medium Size Picture Set            296,121                                Picture 4 : Practical code, Practical Flow
                                                                               Picture 2 Thoeratical Code Practical Flow
         Large Picture Set            1,345,165

More Related Content

Viewers also liked

PAPER FINAL MINA ALAMO DORADO (PAN AM-MEXICO)
PAPER FINAL  MINA ALAMO DORADO (PAN AM-MEXICO)PAPER FINAL  MINA ALAMO DORADO (PAN AM-MEXICO)
PAPER FINAL MINA ALAMO DORADO (PAN AM-MEXICO)Miguel Angel Gonzalez
 
Bolero de julio cortazar
Bolero de julio cortazarBolero de julio cortazar
Bolero de julio cortazarBetty Farana
 
Andrea Diaz Sieiro: ser o no ser moral
Andrea Diaz Sieiro: ser o no ser moralAndrea Diaz Sieiro: ser o no ser moral
Andrea Diaz Sieiro: ser o no ser moral
Filosofía Luis IES Otero Pedrayo Ourense
 
Multiple intelligencetheory
Multiple intelligencetheoryMultiple intelligencetheory
Multiple intelligencetheory
Mariano Tovar Ropero
 
DISFRACES PARA BEBES CASEROS | Ideas Originales Carnaval
DISFRACES PARA BEBES CASEROS | Ideas Originales CarnavalDISFRACES PARA BEBES CASEROS | Ideas Originales Carnaval
DISFRACES PARA BEBES CASEROS | Ideas Originales Carnaval
Miriam TM
 
Adcomm Group Trade Media Advertising Capabilities
Adcomm Group Trade Media Advertising CapabilitiesAdcomm Group Trade Media Advertising Capabilities
Adcomm Group Trade Media Advertising Capabilities
kerry1274
 
La tierra, nuestra casa.
La tierra, nuestra casa.La tierra, nuestra casa.
La tierra, nuestra casa.
Jan Justo
 
Calendario Gallos De Pelea
Calendario Gallos De PeleaCalendario Gallos De Pelea
Calendario Gallos De PeleaLuis Carlos Reza
 
Commentarii de Oblivionis fluminis transitu
Commentarii de Oblivionis fluminis transituCommentarii de Oblivionis fluminis transitu
Commentarii de Oblivionis fluminis transituRosa Mariño
 
The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con...
 The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con... The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con...
The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con...
Juan Carlos Ivancevich
 
el anciano frágil lb
el anciano frágil lbel anciano frágil lb
el anciano frágil lb
Elvin Medina
 
WeChat October 2015 - Data (English)
WeChat October 2015 - Data (English) WeChat October 2015 - Data (English)
WeChat October 2015 - Data (English)
Chris Baker
 
Glossaire de médecine chinoise [alphabétique]
Glossaire de médecine chinoise [alphabétique]Glossaire de médecine chinoise [alphabétique]
Glossaire de médecine chinoise [alphabétique]Véronique Terrier
 
MAMOPLASTIA DE REDUCCIÓN
MAMOPLASTIA DE REDUCCIÓNMAMOPLASTIA DE REDUCCIÓN
MAMOPLASTIA DE REDUCCIÓN
Diego Murillo
 
CSS Inlining in Email: What It IS + How To Do It
CSS Inlining in Email: What It IS + How To Do ItCSS Inlining in Email: What It IS + How To Do It
CSS Inlining in Email: What It IS + How To Do It
Litmus
 
Comunicazione monamour. Cartoline dall'agenzie
Comunicazione monamour. Cartoline dall'agenzieComunicazione monamour. Cartoline dall'agenzie
Comunicazione monamour. Cartoline dall'agenzie
Giuliana Laurita
 

Viewers also liked (18)

PAPER FINAL MINA ALAMO DORADO (PAN AM-MEXICO)
PAPER FINAL  MINA ALAMO DORADO (PAN AM-MEXICO)PAPER FINAL  MINA ALAMO DORADO (PAN AM-MEXICO)
PAPER FINAL MINA ALAMO DORADO (PAN AM-MEXICO)
 
Bolero de julio cortazar
Bolero de julio cortazarBolero de julio cortazar
Bolero de julio cortazar
 
Andrea Diaz Sieiro: ser o no ser moral
Andrea Diaz Sieiro: ser o no ser moralAndrea Diaz Sieiro: ser o no ser moral
Andrea Diaz Sieiro: ser o no ser moral
 
Multiple intelligencetheory
Multiple intelligencetheoryMultiple intelligencetheory
Multiple intelligencetheory
 
DISFRACES PARA BEBES CASEROS | Ideas Originales Carnaval
DISFRACES PARA BEBES CASEROS | Ideas Originales CarnavalDISFRACES PARA BEBES CASEROS | Ideas Originales Carnaval
DISFRACES PARA BEBES CASEROS | Ideas Originales Carnaval
 
Taller30ideas
Taller30ideasTaller30ideas
Taller30ideas
 
Adcomm Group Trade Media Advertising Capabilities
Adcomm Group Trade Media Advertising CapabilitiesAdcomm Group Trade Media Advertising Capabilities
Adcomm Group Trade Media Advertising Capabilities
 
La tierra, nuestra casa.
La tierra, nuestra casa.La tierra, nuestra casa.
La tierra, nuestra casa.
 
Calendario Gallos De Pelea
Calendario Gallos De PeleaCalendario Gallos De Pelea
Calendario Gallos De Pelea
 
Commentarii de Oblivionis fluminis transitu
Commentarii de Oblivionis fluminis transituCommentarii de Oblivionis fluminis transitu
Commentarii de Oblivionis fluminis transitu
 
The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con...
 The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con... The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con...
The Future of Allergy and Clinical Immunology Prof. G. Walter Canonica - Con...
 
el anciano frágil lb
el anciano frágil lbel anciano frágil lb
el anciano frágil lb
 
WeChat October 2015 - Data (English)
WeChat October 2015 - Data (English) WeChat October 2015 - Data (English)
WeChat October 2015 - Data (English)
 
Glossaire de médecine chinoise [alphabétique]
Glossaire de médecine chinoise [alphabétique]Glossaire de médecine chinoise [alphabétique]
Glossaire de médecine chinoise [alphabétique]
 
MAMOPLASTIA DE REDUCCIÓN
MAMOPLASTIA DE REDUCCIÓNMAMOPLASTIA DE REDUCCIÓN
MAMOPLASTIA DE REDUCCIÓN
 
Una forma divertida de aprender a estudiar
Una forma divertida de aprender a estudiarUna forma divertida de aprender a estudiar
Una forma divertida de aprender a estudiar
 
CSS Inlining in Email: What It IS + How To Do It
CSS Inlining in Email: What It IS + How To Do ItCSS Inlining in Email: What It IS + How To Do It
CSS Inlining in Email: What It IS + How To Do It
 
Comunicazione monamour. Cartoline dall'agenzie
Comunicazione monamour. Cartoline dall'agenzieComunicazione monamour. Cartoline dall'agenzie
Comunicazione monamour. Cartoline dall'agenzie
 

Introduction to manycore programming (copia conflictiva de jesús carabaño bravo 2012 12-13)

  • 1. INTRODUCTION TO MANYCORE PROGRAMMING Francisco Dios Buitrago, 70020 Jesus Carabaño Bravo, 70014 Maziar Mehrabi, 36916 Junaid Iqbal, 36785 Hesam Zolfaghari, 85271
  • 2. 2 Objective To develop scalable solution of Libpuzzle using Intel® Cilk™ Plus.
  • 3. Our Team's Approach(s) 3 Unlimited Processors/Memory Read P1 Sign P1 Match P1 . . . . . . . . . . . . . . . . . . . . . . . . Read Ref.Pic Sign Ref.Pic . Sort (Top 10) . . . . . . . . . . . . . . . . . . . . . . . . . . Read Pn Sign Pn Match Pn Simultaneous Reads
  • 4. Our Team's Approach(s) 4 MI=f1(Fref) M1=f1(F1) M2=f1(F2) … Mn=f1(Fn) V1=f2(M1) V2=f2(M2) … Vn=f2(Mn) VI=f2(Mref) D1=f3(Vref,V1) D2=f3(Vref,V2) … Dn=f3(Vref,Vn) Considering Mutex f4(D1) f4(D2) … f4(Dn) Legend – f1: loads files into memory, f2: computes the signature of a picture, f3: matches two signatures, f4: inserts in the top
  • 5. Bird’s Eye View (Practical Approach) 5 Tasks Ref Set of Pic(s) Pic. Ref. Pic Load and Load, Sign & Load , Sign Load, Sign & Load, Sign Sign Match 1 & Match 2 Match 3 …... and Match n Spawn Spawning Insert TOP Start Loop Print (Top Ten)
  • 6. Signature Calculation 6 Conversion from color to Mean of every square gray is done in parallel, is done in parallel, pixel by pixel square by square. Mean of a simple square is done with a reduction, pixel grain Mean of a simple pixel with his neighbors is done with a reduction, neighbor grain
  • 7. Signature Calculation 7 Difference of every square with his Threshold of the signature is done in neighbors is done in parallel, square parallel, element by element. by square
  • 8. Matching 8 The difference of two signatures is The Euclidean length is done with a done in parallel, element by element. reduction, element grain. The Euclidean length of every vector is done in parallel, vector by vector
  • 9. Summary 9  Signature  Every whole picture processing is done in parallel, picture by picture.  The conversion from color to gray is done in parallel, pixel by pixel.  The mean of every square is done in parallel, square by square.  The mean of a simple square is done with a reduction, pixel grain.  The mean of a simple pixel with his neighbors is done with a reduction, neighbor grain.  The difference of every square with his neighbors is done in parallel, square by square.  The difference process on a simple square is done in parallel, neighbor by neighbor.  The thresholding of the signature is done in parallel, element by element.  Matching  The difference of two signatures is done in parallel, element by element.  The Euclidean length is done with a reduction, element grain.  The Euclidean length of every vector is done in parallel, vector by vector.
  • 10. Benchmarking 10 Practical code Practical code Theoretical code Picture Practical Flow Theoretical Flow Practical Flow CilkView Results 0 16 - - 25.00 1 578 - - 21.85 20.00 2 1,591 - 2,808 3 4,976 7,519 5,834 16 15.00 4 7,878 - - 5 44,632 60,622 319,662 10.00 8.92 8.92 8 8.00 7.50 7.50 7.50 Time in Milliseconds 5.00 4 4.00 4.03 4.03 4.03 Picture Sets vs Ref. Picture 2.00 2 0.00 Time (ms) 2 4 8 16 32 Small Picture Set 2,496 Processors Picture 0 : : Practical code, Practical Flow Picture 2: : Practical code, Practical Flow Medium Size Picture Set 296,121 Picture 4 : Practical code, Practical Flow Picture 2 Thoeratical Code Practical Flow Large Picture Set 1,345,165