run this command on the project directory. the compiled code and result will be in the out directory.
nvcc -O3 -o out/cuda source/main.cu `pkg-config --cflags --libs opencv4` --disable-warnings
./cuda --scene mesh.scene --obj subdiv.obj
./cuda --scene mesh.scene --obj subdiv.obj --cuda
--scene <string:scene_file_name>
--obj <string:obj_file_name> [optional]
--out <string:out_file_name> [optional] [default: "output.bmp"]
--threads <int:number_of_threads> [optional] [default: <all_cores_available>]
--width <int:width_of_image> [optional] [default: 1000]
--height <int:height_of_image> [optional] [default: 1000]
--shadow <bool:true|false> [optional] [default: false]
--cuda [optional] [default: false]
CPU (Multi thread): 36.255803 seconds
CUDA: 0.411442 seconds
speed up: x88.2
CPU (Single Core, Intel(R) Xeon(R) Gold 5218R): -
CPU (Multi Thread, Intel(R) Xeon(R) Gold 5218R): 535.287 seconds
CUDA (RTX A5500): 6.625 seconds
speed up: x80.8
CPU (Single Core, Intel(R) Xeon(R) Gold 5218R): 23.344 seconds
CPU (Multi Thread, Intel(R) Xeon(R) Gold 5218R): 1.385 seconds
CUDA (RTX A5500): 0.248 seconds