Skip to content

Commit

Permalink
fix broken linux build + upgrade supported cuda archs
Browse files Browse the repository at this point in the history
  • Loading branch information
kysucix committed Nov 27, 2019
1 parent 56d28f8 commit a5143b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.9)
project (fusibile LANGUAGES CUDA CXX)
project (fusibile)

# Enable C++11 globally
set(CMAKE_CXX_STANDARD 11)
Expand All @@ -21,7 +21,8 @@ endif()
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(.)

set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v --compiler-options -Wall -gencode arch=compute_30,code=sm_30 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_61,code=sm_61)
# from https://en.wikipedia.org/wiki/CUDA#GPUs_supported
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v --compiler-options -Wall -gencode arch=compute_30,code=sm_30 -gencode arch=compute_32,code=sm_32 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75)
#set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v -std=c++11 --compiler-options -Wall -gencode arch=compute_52,code=sm_52)

if(CMAKE_COMPILER_IS_GNUCXX)
Expand Down
15 changes: 8 additions & 7 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
#define NOMINMAX
#include <windows.h>
#include <ctime>
#include "dirent.h"
#include <direct.h>
#include "win32_dirent.h"
#define access _access
#else
#include <dirent.h>
#endif


#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

#include <sys/types.h>
#include "dirent.h"


// Includes CUDA
#include <cuda_runtime.h>
Expand Down Expand Up @@ -667,11 +668,11 @@ static int runFusibile (int argc,
//char outputPath[256];
//sprintf(outputPath, "%s.png", id_string);

if( _access( (inputFiles.images_folder + id_string + ".png").c_str(), R_OK ) != -1 )
if( access( (inputFiles.images_folder + id_string + ".png").c_str(), R_OK ) != -1 )
inputFiles.img_filenames.push_back((id_string + ".png"));
else if( _access( (inputFiles.images_folder + id_string + ".jpg").c_str(), R_OK ) != -1 )
else if( access( (inputFiles.images_folder + id_string + ".jpg").c_str(), R_OK ) != -1 )
inputFiles.img_filenames.push_back((id_string + ".jpg"));
else if( _access( (inputFiles.images_folder + id_string + ".ppm").c_str(), R_OK ) != -1 )
else if( access( (inputFiles.images_folder + id_string + ".ppm").c_str(), R_OK ) != -1 )
inputFiles.img_filenames.push_back((id_string + ".ppm"));
}
size_t numImages = inputFiles.img_filenames.size ();
Expand Down
File renamed without changes.

0 comments on commit a5143b7

Please sign in to comment.