Brook to Hardware - PowerPoint PPT Presentation

About This Presentation
Title:

Brook to Hardware

Description:

Brook to Hardware – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 6
Provided by: ianb154
Category:
Tags: brook | grid | hardware

less

Transcript and Presenter's Notes

Title: Brook to Hardware


1
Brook to Hardware
  • Phase 1

2
Brook Code
  • kernel void SetValues (out Flow grid_outxy)
  • kernel void Convolve (Flow grid_in
    -1..1-1..1, out Flow grid_out, float rate)
    ...
  • kernel float Diverge (Flow diverge
    -1..1-1..1) ...
  • void main (void)
  • Flow grid10241024
  • float maxdiff
  • / initialize grid /
  • SetValues(grid)
  • do
  • / Perform the convolution /
  • Convolve (grid, grid, 0.1f)
  • maxdiff max (Diverge(grid))
  • while (maxdiff gt THRESHOLD)

3
Brook Code
  • kernel void SetValues (out Flow grid_outxy)
  • kernel void Convolve (Flow grid_in
    -1..1-1..1, out Flow grid_out, float rate)
    ...
  • kernel float Diverge (Flow diverge
    -1..1-1..1) ...
  • void main (void)
  • Flow grid10241024
  • float maxdiff
  • / initialize grid /
  • SetValues(grid)
  • do
  • / Perform the convolution /
  • Convolve (grid, grid, 0.1f)
  • maxdiff max (Diverge(grid))
  • while (maxdiff gt THRESHOLD)

4
Stream Graph
SetValues
Convolve
CONDITIONAL1
CONSTANT1
Diverge
Max
MAXOUTPUT1
5
Scalar Code
  • void main (void)
  • float maxdiff
  • do
  • SetScalar ("CONSTANT1", 0.1f)
  • maxdiff GetScalar ("MAXOUTPUT")
  • SetScalar ("CONDITIONAL1", (maxdiff gt
    THRESHOLD))
  • while (maxdiff gt THRESHOLD)
Write a Comment
User Comments (0)
About PowerShow.com