Difference between revisions of "Iced Cakes Pipeline"

From CSE231 Wiki
Jump to navigation Jump to search
Line 1: Line 1:
=Where To Start=
+
=Motivation=
 +
Pipelines can increase throughput when processing a stream of data.
  
==Test Suite==
+
=Backgroud=
In <code>src/test/java</code> in package <code>opencv.pipeline.studio</code> you will find <code>PipelineFaceDetectionTestSuite</code>.
+
<youtube>3cqVtc2rDlg</youtube>
  
==Studio==
+
=Code To Use=
In <code>src/main/java</code> in package <code>opencv.pipeline.studio</code> you will find <code>ParallelPipelineFaceDetectionProducer</code>.
+
==Cakes==
  
Checkout <code>SequentialPipelineFaceDetectionProducer</code> for specifics on the necessary method calls.
+
==Looping==
 +
[https://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html Java For Loop]
  
[https://www.cs.rice.edu/~vs3/hjlib/code/course-materials/demo-files/PhaserPipeline.java RiceX Pipeline Demo]
+
==Phasers==
 +
[https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html class Phaser] ([http://www.baeldung.com/java-phaser Guide to the Java Phaser])
 +
: [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#register-- register]
 +
: [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#arrive-- arrive]
 +
: [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#awaitAdvance-int- awaitAdvance]
  
 +
=Questions To Ask Yourself=
 +
# What are my tasks?
 +
# What work does each task need to do?
 +
# Upon what does each task depend?  That is: what does each task have to wait for before it may proceed?
 +
 +
=Code To Implement=
 +
{{CodeToImplement|CakePipeline|mixBakeAndIceCakes|pipeline.cake.studio}}
 +
 +
{{Parallel|public static IcedCake[] mixBakeAndIceCakes(Mixer mixer, Baker baker, Icer icer, int cakeCount)}}
 +
 +
=Testing Your Solution=
 
==Visualization==
 
==Visualization==
In <code>src/visualization/java</code> in package <code>opencv.pipeline.viz</code> you will find <code>PipelineFaceDetectionApp</code>.
+
{{Viz|CakePipelineVizApp|leggedrace.viz}}
 +
 
 +
Click on the buttons on the right to visualize your solutions when you have implemented them.
  
[[File:OpencvPipelineViz.png|600px]]
+
[[File:CakePipelineScreenShot.png]]
 +
==Correctness==
 +
{{TestSuite|CakePipelineTestSuite|pipeline.cake.viz}}
  
=Research=
+
{{TestSuite|PartialCreditLeggedRaceTestSuite|leggedrace.studio}}
==Voila-Jones==
 
[https://en.wikipedia.org/wiki/Viola%E2%80%93Jones_object_detection_framework Wikipedia: Viola–Jones object detection framework]
 
  
[https://www.cs.cmu.edu/~efros/courses/LBMV07/Papers/viola-cvpr-01.pdf CVPR 2001: Rapid Object Detection using a Boosted Cascade of Simple Features]
+
When you are passing the tests and your visualization looks good, demo it to an instructor.

Revision as of 08:17, 2 April 2018

Motivation

Pipelines can increase throughput when processing a stream of data.

Backgroud

Code To Use

Cakes

Looping

Java For Loop

Phasers

class Phaser (Guide to the Java Phaser)

register
arrive
awaitAdvance

Questions To Ask Yourself

  1. What are my tasks?
  2. What work does each task need to do?
  3. Upon what does each task depend? That is: what does each task have to wait for before it may proceed?

Code To Implement

class: CakePipeline.java Java.png
methods: mixBakeAndIceCakes
package: pipeline.cake.studio
source folder: student/src/main/java

method: public static IcedCake[] mixBakeAndIceCakes(Mixer mixer, Baker baker, Icer icer, int cakeCount) Parallel.svg (parallel implementation required)

Testing Your Solution

Visualization

class: CakePipelineVizApp.java VIZ
package: leggedrace.viz
source folder: student/src//java

Click on the buttons on the right to visualize your solutions when you have implemented them.

CakePipelineScreenShot.png

Correctness

class: CakePipelineTestSuite.java Junit.png
package: pipeline.cake.viz
source folder: testing/src/test/java
class: PartialCreditLeggedRaceTestSuite.java Junit.png
package: leggedrace.studio
source folder: testing/src/test/java

When you are passing the tests and your visualization looks good, demo it to an instructor.