Issue 1:
hi,

My OS is ubuntu 16.04 with CUDA 8.0 RC

to build opencv (master branch (clone since 2016/06/22)) with cuda and gcc version 5.3.1

mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 ..
make -j 8

but with compile errors

/usr/local/cuda-8.0/include/thrust/detail/reference.inl(127): error: no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>"
detected during:
instantiation of "void thrust::reference<Element, Pointer, Derived>::assign_from(OtherPointer) [with Element=float2, Pointer=thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>, Derived=thrust::use_default, OtherPointer=const float2 *]"
(65): here
instantiation of "thrust::reference<Element, Pointer, Derived>::derived_type &thrust::reference<Element, Pointer, Derived>::operator=(const thrust::reference<Element, Pointer, Derived>::value_type &) [with Element=float2, Pointer=thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>, Derived=thrust::use_default]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/block/copy.h(209): here
instantiation of "RandomAccessIterator2 thrust::system::cuda::detail::block::async_copy_n(Context &, RandomAccessIterator1, Size, RandomAccessIterator2) [with Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, RandomAccessIterator1=float2 *, Size=unsigned int, RandomAccessIterator2=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/block/copy.h(220): here
instantiation of "RandomAccessIterator2 thrust::system::cuda::detail::block::copy_n(Context &, RandomAccessIterator1, Size, RandomAccessIterator2) [with Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, RandomAccessIterator1=float2 *, Size=unsigned int, RandomAccessIterator2=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/stable_sort_each.inl(258): here
instantiation of "void thrust::system::cuda::detail::detail::stable_sort_each_detail::stable_sort_each_copy_closure<work_per_thread, Context, RandomAccessIterator1, Size, RandomAccessIterator2, Compare>::operator()(RandomAccessIterator) [with work_per_thread=7U, Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, RandomAccessIterator1=thrust::device_ptr<float2>, Size=signed long, RandomAccessIterator2=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Compare=cv::cuda::device::gfft::EigGreater, RandomAccessIterator=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/virtualized_smem_closure.h(55): here
[ 11 instantiation contexts not shown ]
instantiation of "thrust::system::cuda::detail::stable_sort_detail::enable_if_comparison_sort<RandomAccessIterator, StrictWeakOrdering>::type thrust::system::cuda::detail::stable_sort_detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/sort.inl(213): here
instantiation of "void thrust::system::cuda::detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(83): here
instantiation of "void thrust::stable_sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/detail/generic/sort.inl(63): here
instantiation of "void thrust::system::detail::generic::sort(thrust::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(56): here
instantiation of "void thrust::sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/home/tumh/opencv/modules/cudaimgproc/src/cuda/gftt.cu(139): here

/usr/local/cuda-8.0/include/thrust/detail/reference.inl(98): error: no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>"
detected during:
instantiation of "thrust::reference<Element, Pointer, Derived>::operator thrust::reference<Element, Pointer, Derived>::value_type() const [with Element=thrust::detail::uint32_t, Pointer=thrust::pointer<thrust::detail::uint32_t, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>, Derived=thrust::use_default]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/stable_merge_sort.inl(209): here
instantiation of "void thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<work_per_thread, Context, Size, Iterator1, Iterator2, Iterator3, Compare>::operator()(RandomAccessIterator) [with work_per_thread=7U, Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, Size=thrust::detail::uint32_t, Iterator1=thrust::device_ptr<float2>, Iterator2=thrust::detail::normal_iterator<thrust::pointer<thrust::detail::uint32_t, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Iterator3=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Compare=cv::cuda::device::gfft::EigGreater, RandomAccessIterator=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/virtualized_smem_closure.h(55): here
instantiation of "void thrust::system::cuda::detail::detail::virtualized_smem_closure<Closure, RandomAccessIterator>::operator()() [with Closure=thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<7U, thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, thrust::detail::uint32_t, thrust::device_ptr<float2>, thrust::detail::normal_iterator<thrust::pointer<thrust::detail::uint32_t, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, cv::cuda::device::gfft::EigGreater>, RandomAccessIterator=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/launch_closure.inl(52): here
instantiation of "void thrust::system::cuda::detail::detail::launch_closure_by_value(Closure) [with Closure=thrust::system::cuda::detail::detail::virtualized_smem_closure<thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<7U, thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, thrust::detail::uint32_t, thrust::device_ptr<float2>, thrust::detail::normal_iterator<thrust::pointer<thrust::detail::uint32_t, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, cv::cuda::device::gfft::EigGreater>, float2 *>]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/launch_closure.inl(81): here
instantiation of "thrust::system::cuda::detail::detail::closure_launcher_base<Closure, launch_by_value>::launch_function_t thrust::system::cuda::detail::detail::closure_launcher_base<Closure, launch_by_value>::get_launch_function() [with Closure=thrust::system::cuda::detail::detail::virtualized_smem_closure<thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<7U, thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, thrust::detail::uint32_t, thrust::device_ptr<float2>, thrust::detail::normal_iterator<thrust::pointer<thrust::detail::uint32_t, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, cv::cuda::device::gfft::EigGreater>, float2 *>, launch_by_value=true]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/launch_closure.inl(89): here
[ 8 instantiation contexts not shown ]
instantiation of "thrust::system::cuda::detail::stable_sort_detail::enable_if_comparison_sort<RandomAccessIterator, StrictWeakOrdering>::type thrust::system::cuda::detail::stable_sort_detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/sort.inl(213): here
instantiation of "void thrust::system::cuda::detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(83): here
instantiation of "void thrust::stable_sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/detail/generic/sort.inl(63): here
instantiation of "void thrust::system::detail::generic::sort(thrust::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(56): here
instantiation of "void thrust::sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/home/tumh/opencv/modules/cudaimgproc/src/cuda/gftt.cu(139): here

/usr/local/cuda-8.0/include/thrust/detail/reference.inl(98): error: no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>"
detected during:
instantiation of "thrust::reference<Element, Pointer, Derived>::operator thrust::reference<Element, Pointer, Derived>::value_type() const [with Element=float2, Pointer=thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>, Derived=thrust::use_default]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/block/copy.h(243): here
instantiation of "RandomAccessIterator2 thrust::system::cuda::detail::block::async_copy_n_global_to_shared<work_per_thread,Context,RandomAccessIterator1,Size,RandomAccessIterator2>(Context &, RandomAccessIterator1, Size, RandomAccessIterator2) [with work_per_thread=7U, Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, RandomAccessIterator1=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Size=unsigned int, RandomAccessIterator2=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/stable_merge_sort.inl(113): here
instantiation of "void thrust::system::cuda::detail::detail::stable_merge_sort_detail::block::staged_bounded_merge<work_per_thread,Context,Iterator1,Size1,Iterator2,Size2,Iterator3,Iterator4,Compare>(Context &, Iterator1, Size1, Iterator2, Size2, Iterator3, Iterator4, Compare) [with work_per_thread=7U, Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, Iterator1=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Size1=unsigned int, Iterator2=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Size2=unsigned int, Iterator3=float2 *, Iterator4=thrust::device_ptr<float2>, Compare=thrust::detail::wrapped_function<cv::cuda::device::gfft::EigGreater, __nv_bool>]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/stable_merge_sort.inl(216): here
instantiation of "void thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<work_per_thread, Context, Size, Iterator1, Iterator2, Iterator3, Compare>::operator()(RandomAccessIterator) [with work_per_thread=7U, Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, Size=thrust::detail::uint32_t, Iterator1=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Iterator2=thrust::detail::normal_iterator<thrust::pointer<thrust::detail::uint32_t, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Iterator3=thrust::device_ptr<float2>, Compare=cv::cuda::device::gfft::EigGreater, RandomAccessIterator=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/virtualized_smem_closure.h(55): here
instantiation of "void thrust::system::cuda::detail::detail::virtualized_smem_closure<Closure, RandomAccessIterator>::operator()() [with Closure=thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<7U, thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, thrust::detail::uint32_t, thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<thrust::detail::uint32_t, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::device_ptr<float2>, cv::cuda::device::gfft::EigGreater>, RandomAccessIterator=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/launch_closure.inl(52): here
[ 10 instantiation contexts not shown ]
instantiation of "thrust::system::cuda::detail::stable_sort_detail::enable_if_comparison_sort<RandomAccessIterator, StrictWeakOrdering>::type thrust::system::cuda::detail::stable_sort_detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/sort.inl(213): here
instantiation of "void thrust::system::cuda::detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(83): here
instantiation of "void thrust::stable_sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/detail/generic/sort.inl(63): here
instantiation of "void thrust::system::detail::generic::sort(thrust::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(56): here
instantiation of "void thrust::sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/home/tumh/opencv/modules/cudaimgproc/src/cuda/gftt.cu(139): here

/usr/local/cuda-8.0/include/thrust/detail/reference.inl(98): error: no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>"
detected during:
instantiation of "thrust::reference<Element, Pointer, Derived>::operator thrust::reference<Element, Pointer, Derived>::value_type() const [with Element=signed long, Pointer=thrust::pointer<signed long, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>, Derived=thrust::use_default]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/stable_merge_sort.inl(209): here
instantiation of "void thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<work_per_thread, Context, Size, Iterator1, Iterator2, Iterator3, Compare>::operator()(RandomAccessIterator) [with work_per_thread=7U, Context=thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, Size=signed long, Iterator1=thrust::device_ptr<float2>, Iterator2=thrust::detail::normal_iterator<thrust::pointer<signed long, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Iterator3=thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, Compare=cv::cuda::device::gfft::EigGreater, RandomAccessIterator=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/virtualized_smem_closure.h(55): here
instantiation of "void thrust::system::cuda::detail::detail::virtualized_smem_closure<Closure, RandomAccessIterator>::operator()() [with Closure=thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<7U, thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, signed long, thrust::device_ptr<float2>, thrust::detail::normal_iterator<thrust::pointer<signed long, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, cv::cuda::device::gfft::EigGreater>, RandomAccessIterator=float2 *]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/launch_closure.inl(52): here
instantiation of "void thrust::system::cuda::detail::detail::launch_closure_by_value(Closure) [with Closure=thrust::system::cuda::detail::detail::virtualized_smem_closure<thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<7U, thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, signed long, thrust::device_ptr<float2>, thrust::detail::normal_iterator<thrust::pointer<signed long, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, cv::cuda::device::gfft::EigGreater>, float2 *>]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/launch_closure.inl(81): here
instantiation of "thrust::system::cuda::detail::detail::closure_launcher_base<Closure, launch_by_value>::launch_function_t thrust::system::cuda::detail::detail::closure_launcher_base<Closure, launch_by_value>::get_launch_function() [with Closure=thrust::system::cuda::detail::detail::virtualized_smem_closure<thrust::system::cuda::detail::detail::stable_merge_sort_detail::merge_adjacent_partitions_closure<7U, thrust::system::cuda::detail::detail::statically_blocked_thread_array<256U>, signed long, thrust::device_ptr<float2>, thrust::detail::normal_iterator<thrust::pointer<signed long, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float2, thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, thrust::use_default, thrust::use_default>>, cv::cuda::device::gfft::EigGreater>, float2 *>, launch_by_value=true]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/detail/launch_closure.inl(89): here
[ 8 instantiation contexts not shown ]
instantiation of "thrust::system::cuda::detail::stable_sort_detail::enable_if_comparison_sort<RandomAccessIterator, StrictWeakOrdering>::type thrust::system::cuda::detail::stable_sort_detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/cuda/detail/sort.inl(213): here
instantiation of "void thrust::system::cuda::detail::stable_sort(thrust::system::cuda::detail::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(83): here
instantiation of "void thrust::stable_sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/system/detail/generic/sort.inl(63): here
instantiation of "void thrust::system::detail::generic::sort(thrust::execution_policy<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/usr/local/cuda-8.0/include/thrust/detail/sort.inl(56): here
instantiation of "void thrust::sort(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator, RandomAccessIterator, StrictWeakOrdering) [with DerivedPolicy=thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>, RandomAccessIterator=thrust::device_ptr<float2>, StrictWeakOrdering=cv::cuda::device::gfft::EigGreater]"
/home/tumh/opencv/modules/cudaimgproc/src/cuda/gftt.cu(139): here

4 errors detected in the compilation of "/tmp/tmpxft_00000d6b_00000000-11_gftt.compute_35.cpp1.ii".
CMake Error at cuda_compile_generated_gftt.cu.o.cmake:266 (message):
Error generating file
/home/tumh/opencv/build/modules/cudaimgproc/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gftt.cu.o

modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/build.make:147: recipe for target 'modules/cudaimgproc/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gftt.cu.o' failed
make[2]: *** [modules/cudaimgproc/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gftt.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:4523: recipe for target 'modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all' failed
make[1]: *** [modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Scanning dependencies of target opencv_cudafeatures2d
[ 64%] Building CXX object modules/cudafeatures2d/CMakeFiles/opencv_cudafeatures2d.dir/src/brute_force_matcher.cpp.o
[ 65%] Building CXX object modules/cudafeatures2d/CMakeFiles/opencv_cudafeatures2d.dir/src/feature2d_async.cpp.o
[ 65%] Building CXX object modules/cudafeatures2d/CMakeFiles/opencv_cudafeatures2d.dir/src/orb.cpp.o
[ 65%] Building CXX object modules/cudafeatures2d/CMakeFiles/opencv_cudafeatures2d.dir/src/fast.cpp.o
[ 65%] Linking CXX shared library ../../lib/libopencv_cudafeatures2d.so
[ 65%] Built target opencv_cudafeatures2d
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Any advise?

Thank you

Issue 2:
First of all I know Cuda 8 came fresh out of the box, However I think there are some people who would love to see support for Visual Studio 2015 because Cuda 7.5 was not ready to be compiled out of the box for VS 2015.

However with the current master branch I encountered some errors which I guess must come from using CUDA 8 toolkit. Further I will discuss those Errors.

There are some Errors also in perf_tests but I just disabled them in cmake because I figured they are not as important for the time being.

System

OpenCV version: 3.1 (current master branch 20160603 18:00)

Win 8.1

VS 2015 Compiler

CUDA 8 toolkit

Current Issue present in following Project:

opencv_cudaimgproc

Additional description

Current Cmake excerpt of Cuda settings

NVIDIA CUDA
Use CUFFT: YES
Use CUBLAS: NO
USE NVCUVID: NO
NVIDIA GPU arch: 20 21 30 35
NVIDIA PTX archs: 30
Use fast math: NO

Compiler

C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.23506.0)`

Cmake NVCC target flags:

CUDA detected: 8.0
CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-D_FORCE_INLINES;-gencode;arch=compute_30,code=compute_30

Compiler output:

Severity Code Description Project File Line Suppression State
Error no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>" opencv_cudaimgproc D:\Libs\CUDA8toolkit\include\thrust\detail\reference.inl 127
Error no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>" opencv_cudaimgproc D:\Libs\CUDA8toolkit\include\thrust\detail\reference.inl 98
Error no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>" opencv_cudaimgproc D:\Libs\CUDA8toolkit\include\thrust\detail\reference.inl 98
Error no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>" opencv_cudaimgproc D:\Libs\CUDA8toolkit\include\thrust\detail\reference.inl 98

Code Section Error is referring to:

__thrust_exec_check_disable__
template<typename Element, typename Pointer, typename Derived>
template<typename OtherPointer>
void reference<Element,Pointer,Derived>
::assign_from(OtherPointer src)
{
typedef typename thrust::iterator_system<pointer>::type System1;
typedef typename thrust::iterator_system<OtherPointer>::type System2;

System1 system1; // THIS IS THE LINE THROWING THE ERROR
System2 system2;

using thrust::system::detail::generic::select_system;

strip_const_assign_value(select_system(system1, system2), src);
} // end assign_from()

And:

__thrust_exec_check_disable__
template<typename Element, typename Pointer, typename Derived>
reference<Element,Pointer,Derived>
::operator typename reference<Element,Pointer,Derived>::value_type () const
{
typedef typename thrust::iterator_system<pointer>::type System;

System system; // THIS IS THE LINE THROWING THE ERROR
using thrust::system::detail::generic::select_system;
return strip_const_get_value(select_system(system));
} // end reference::operator value_type ()

So yeah maybe someone has an Idea? because I am not getting anywhere with this.

Also it's the first time posting on here so feel free to correct me if i missed something!