- img.hpp/img.cpp
- Image parsing and writing
- Image related structs and classes
- img-utils.cuh
- Cuda header file with needed declarations for the kernel and setup code
- setup.cu
- Setup code for the GPU (mallocs and memcpys)
- Reading input file (this should be done somewhere else ideally)
- Writing output file (this should be done somewhere else ideally)
- convolution-kernel.cu
- The most unoptimized convolution kernel implementation
- Right now uses a FILTER_SIZE*FILTER_SIZE blur filter
- Parse cmd-args
- create or read input image(s)
- Prepare input / output variables
- Allocate memory
- Memcpy input contents to GPU
- Run the correct shader kernel on the GPU
- Collect the result in host memory
- Repeat from step 2. for all images
- Write output image(s) to disk
- cleanup
Use the Makefile provided by running: make all
This builds the binary, you can then run it using:
cat INPUT_FILENAME.ppm | ./build/main [box | gauss | motion] [OUTPUT_FILENAME.ppm]
The output is written to either the specified OUTFILE_NAME.ppm, or output.ppm if nothing else is provided.
TODO: Is this how we want it? ./main -s SHADER_NAME -f FILENAME... -d DIRNAME
The outputs will be placed either in the output directory specified by the -d flag, or into the current directory with the filenames of the outupts in the format output-NNN.ppm