-- Scroll down for English version --
Il progetto consiste nell'implementazione SIMD e CUDA dell’algoritmo Fixed Window per il calcolo della Disparity Map da un’immagine Stereo.
dataset: contiene i file ppm dei dataset.include: cartella con i file di include.nc-profiling: file di profiling di Nsight Compute.src: cartella con i file di implementazione delle librerie sviluppate.cuda_main.cu: implementazioni dell'algoritmo FW CUDA.stereo_fw.cpp: implementazioni dell'algoritmo FW SISD e SIMD.utils.cpp: funzioni di utilità per trattare i file ppm e convertire array di tipi diversi.
CMakeLists.txt: file CMake.main.cpp: file main C++.README.md: file README attuale con struttura del progetto e istruzioni per l'esecuzione.
- Compilazione ed esecuzione con CMake:
- creare la cartella "build" e navigarci all'interno:
mkdir build && cd build - eseguire cmake:
cmake .. - compilazione:
make - esecuzione:
./main 0 16 5
- creare la cartella "build" e navigarci all'interno:
Per cambiare le impostazioni di ottimizzazione (autovettorizzazione) è necessario modificare il file "CMakeLists.txt".
-
Get CPU info (Ubuntu):
lscpu, in the flags section are listed the available instruction sets (like AVX2). -
Compilazione senza CMake (NON PIÙ SUPPORTATO):
- Compile:
g++ hello.cpp -o hello - Compile with optimization:
g++ hello.cpp -Ox -o hellowhere x in [0,3]. with-mavx2it is possible to specify the AVX2 family - Compile with maximum optimization that targets the native architecture:
g++ hello.cpp -O3 -march=native -o hello - Compile with OpenMP:
g++ -fopenmp hello.cpp -o hello - Execution:
./hello - CUDA Compile:
nvcc -Wno-deprecated-gpu-targets hello.cu -o hello - CUDA Execution:
./hello
- Compile:
I risultati sono presentati in: resources/Project_Presentation_IT.pdf
The project consists of the SIMD and CUDA implementation of the Fixed Window algorithm for computing the Disparity Map from a Stereo image.
- dataset: contains the dataset ppm files.
- include: folder with include files.
- nc-profiling: Nsight Compute profiling files.
- src: folder with implementation files of the developed libraries.
- cuda_main.cu: CUDA FW algorithm implementations.
- stereo_fw.cpp: SISD and SIMD FW algorithm implementations.
- utils.cpp: utility functions for handling ppm files and converting arrays of different types.
- CMakeLists.txt: CMake file.
- main.cpp: C++ main file.
- README.md: current README file with project structure and execution instructions.
Compilation and execution with CMake:
- create the "build" folder and navigate into it:
mkdir build && cd build - run cmake:
cmake .. - compile:
make - run:
./main 0 16 5
To change optimization settings (autovectorization), edit the "CMakeLists.txt" file.
Get CPU info (Ubuntu): lscpu, the available instruction sets (like AVX2) are listed in the flags section.
Compilation without CMake (NO LONGER SUPPORTED):
- Compile:
g++ hello.cpp -o hello - Compile with optimization:
g++ hello.cpp -Ox -o hellowhere x ∈ [0,3]. With-mavx2it is possible to specify the AVX2 family. - Compile with maximum optimization targeting the native architecture:
g++ hello.cpp -O3 -march=native -o hello - Compile with OpenMP:
g++ -fopenmp hello.cpp -o hello - Execution:
./hello - CUDA Compile:
nvcc -Wno-deprecated-gpu-targets hello.cu -o hello - CUDA Execution:
./hello
Results can be found in: resources/Project_Presentation_IT.pdf