Code Setup#
Obtaining and Running the Code#
In the previous homework, we dealt with a streaming application that compressed only one picture. For this homework, we will use the same application, except that it will take a video stream instead of a single picture. You can run the walk-through on the host computer. But note that you need to run the code for homework submission on the Ultra96.
Clone the
ese532_coderepository using the following command:git clone https://github.com/icgrp/ese532_code.git
If you already have it cloned, pull in the latest changes using:
cd ese532_code/ git pull origin master
The code you will use for homework submission is in the
hw3directory. The directory structure looks like this:hw3/ assignment/ Makefile Walkthrough.cpp common/ App.h Constants.h Stopwatch.h Utilities.h Utilities.cpp baseline/ App.cpp Compress.cpp Differentiate.cpp Filter.cpp Scale.cpp coarse_grain/ ... pipeline_2_cores/ ... cdc_parallel/ ... data/ Input.bin Golden.bin
There are four parts to the homework. You can build all of them by executing
make allin thehw3/assignmentdirectory. You can build separately by:make baseand run./baseto run the baseline project.make coarseand run./coarseto run the coarse-grain project.make pipeline2and run./pipeline2to run the pipeline project on 2 cores.make cdcand run./cdcto run the data-parallel CDC you will implement on 4 cores.
The
datafolder contains the input data,Input.bin, which has 100 frames of size \(960\) by \(540\) pixels, where each pixel is a byte.Golden.bincontains the expected output.base,coarseandpipeline2uses this file to see if there is a mismatch between your program’s output and the expected output.cdcusesprince.txtfrom thedatafolder as an input.golden.txthas the expected output cdc will produce.The
assignment/commonfolder has header files and helper functions used by the four parts.You will mostly be working with the code in the rest of the folders.