Skip to content
Snippets Groups Projects
Commit 7be19cc1 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Remove some compile warnings

parent 1a91d9e0
No related branches found
No related tags found
No related merge requests found
Pipeline #33520 passed
......@@ -23,10 +23,6 @@ EXTERN_DLL_EXPORT voltu::System* voltu_initialise()
{
return new SystemImpl();
}
else
{
throw voltu::exceptions::AlreadyInit();
}
return nullptr;
}
......
......@@ -9,7 +9,12 @@ set(CALIBSRC
if (WITH_CERES)
list(APPEND CALIBSRC src/optimize.cpp)
set_source_files_properties(src/optimize.cpp PROPERTIES COMPILE_FLAGS -O3)
if(WIN32)
set_source_files_properties(src/optimize.cpp PROPERTIES COMPILE_FLAGS /O2)
else()
set_source_files_properties(src/optimize.cpp PROPERTIES COMPILE_FLAGS -O3)
endif()
endif()
add_library(ftlcalibration ${CALIBSRC})
......
......@@ -309,7 +309,7 @@ void ftl::cuda::vuya_to_depth(const cv::cuda::PtrStepSz<float> &depth, const cv:
const dim3 gridSize((depth.cols/2 + THREADS_X - 1)/THREADS_X, (depth.rows/2 + THREADS_Y - 1)/THREADS_Y);
const dim3 blockSize(THREADS_X, THREADS_Y);
vuya_to_depth_kernel<ushort,THREADS_X,THREADS_Y><<<gridSize, blockSize, 0, cv::cuda::StreamAccessor::getStream(stream)>>>(depth, luminance.data, chroma.data, luminance.step/sizeof(ushort), maxdepth);
vuya_to_depth_kernel<ushort,THREADS_X,THREADS_Y><<<gridSize, blockSize, 0, cv::cuda::StreamAccessor::getStream(stream)>>>(depth, luminance.data, chroma.data, int(luminance.step/sizeof(ushort)), maxdepth);
cudaSafeCall( cudaGetLastError() );
}
......
......@@ -5,7 +5,7 @@ using ftl::cuda::TextureObject;
using ftl::cuda::warpSum;
__device__ inline ftl::cuda::Collision pack_collision(int cx, int cy, int num, float cd) {
return ftl::cuda::Collision{(num << 24) | (cx << 12) | (cy), cd};
return ftl::cuda::Collision{((unsigned int)num << 24) | ((unsigned int)cx << 12) | ((unsigned int)cy), cd};
}
__global__ void touch_kernel(TextureObject<float> depth_in, TextureObject<float> depth_out, ftl::cuda::Collision *collisions, int max_collisions, float dist) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment