Skip to content
Snippets Groups Projects
Commit 6d9da3af authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

nvcc: --expt-relaxed-constexpr for numeric_limits

parent 887aa933
No related branches found
No related tags found
No related merge requests found
Pipeline #24861 failed
......@@ -20,10 +20,10 @@ set(CMAKE_USE_RELATIVE_PATHS ON)
set(CMAKE_CXX_FLAGS_RELEASE)
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CUDA_FLAGS "--gpu-architecture=compute_61 -std=c++14 -Xcompiler -fPIC -Xcompiler ${OpenMP_CXX_FLAGS}")
set(CMAKE_CUDA_FLAGS "--gpu-architecture=compute_61 -std=c++14 -Xcompiler -fPIC -Xcompiler ${OpenMP_CXX_FLAGS} --expt-relaxed-constexpr")
set(CMAKE_CUDA_FLAGS_RELEASE "-O3")
else()
set(CMAKE_CUDA_FLAGS "--gpu-architecture=compute_61 -std=c++14")
set(CMAKE_CUDA_FLAGS "--gpu-architecture=compute_61 -std=c++14 --expt-relaxed-constexpr")
set(CMAKE_CUDA_FLAGS_RELEASE "-O3")
endif()
......@@ -51,6 +51,7 @@ set_target_properties(libstereo PROPERTIES PUBLIC_HEADER include/stereo.hpp)
else()
add_library(libstereo
src/stereo_gradientstree.cu
src/stereo_gtsgm.cu
src/stereo_misgm.cu
src/stereo_misgm2.cu
src/stereo_censussgm.cu
......
......@@ -76,7 +76,7 @@ namespace algorithms {
auto* ptr_min_cost = min_cost.ptr(y);
for (int x = 0; x < dsi.width; ++x) {
TCost min1 = TCost(-1); //std::numeric_limits<TCost>::max();
TCost min1 = std::numeric_limits<TCost>::max();
//TCost min2 = TCost(-1); //std::numeric_limits<TCost>::max();
TDisp d = TDisp(0);
......@@ -146,7 +146,7 @@ namespace algorithms {
TDisp* ptr_disparity = disparity.ptr(y);
for (int x = thread.x; x < size.x; x+=stride.x) {
TCost min1 = TCost(-1); //std::numeric_limits<TCost>::max();
TCost min1 = std::numeric_limits<TCost>::max();
TDisp d = TDisp(0);
for (int d_ = dsi.disp_min; d_ < min(dsi.disp_max+1, dsi.width-x); d_++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment