Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[thrust] cuda/std/detail/libcxx/include/tuple error: call of overloaded swap() is ambiguous #846

Closed
wants to merge 1 commit into from

Conversation

cjmayo
Copy link
Contributor

@cjmayo cjmayo commented Jun 14, 2024

not for merging - to demonstrate compiling with CCCL.

Since 0577aab compiling with recent CCCL fails, with GCC 13:

/home/runner/work/manifold/manifold/src/polygon/src/polygon.cpp:844:16:   required from here
/usr/include/cuda/std/detail/libcxx/include/tuple:208:7: error: call of overloaded ‘swap(__gnu_cxx::__normal_iterator<{anonymous}::EarClip::Vert*, std::vector<{anonymous}::EarClip::Vert> >&, __gnu_cxx::__normal_iterator<{anonymous}::EarClip::Vert*, std::vector<{anonymous}::EarClip::Vert> >&)’ is ambiguous
  208 |   swap(__x.get(), __y.get());
      |   ~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/cuda/std/__functional/hash.h:36,
                 from /usr/include/cuda/std/detail/libcxx/include/utility:24,
                 from /usr/include/cuda/std/utility:26,
                 from /usr/include/thrust/pair.h:33,
                 from /usr/include/thrust/binary_search.h:33:
/usr/include/cuda/std/__utility/swap.h:35:81: note: candidate: ‘constexpr cuda::std::__4::__swap_result_t<_Tp> cuda::std::__4::swap(_Tp&, _Tp&) [with _Tp = __gnu_cxx::__normal_iterator<{anonymous}::EarClip::Vert*, std::vector<{anonymous}::EarClip::Vert> >; __swap_result_t<_Tp> = void]’
   35 | inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 __swap_result_t<_Tp> swap(_Tp& __x, _Tp& __y) noexcept(
      |                                                                                 ^~~~
In file included from /usr/include/c++/13/bits/stl_function.h:60,
                 from /usr/include/c++/13/functional:49,
                 from /home/runner/work/manifold/manifold/src/polygon/include/polygon.h:16,
                 from /home/runner/work/manifold/manifold/src/polygon/src/polygon.cpp:15:
/usr/include/c++/13/bits/move.h:189:5: note: candidate: ‘std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = __gnu_cxx::__normal_iterator<{anonymous}::EarClip::Vert*, vector<{anonymous}::EarClip::Vert> >; _Require<__not_<__is_tuple_like<_Tp> >, is_move_constructible<_Tp>, is_move_assignable<_Tp> > = void]’
  189 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
make[2]: *** [src/polygon/CMakeFiles/polygon.dir/build.make:79: src/polygon/CMakeFiles/polygon.dir/src/polygon.cpp.o] Error 1

I guess that is a result of Replace thrust::tuple implementation with cuda::std::tuple NVIDIA/cccl@61c1fd0
which has caused other problems NVIDIA/cccl@78a61a2
so their problem, but a bit outside my knowledge to understand what we would want.

@elalish
Copy link
Owner

elalish commented Jun 14, 2024

Thanks, but @pca006132 and I have decided to replace Thrust with PSTL instead of CCCL: #823. Looking to minimize dependencies and maximize where everything compiles. Help would be great though!

@cjmayo
Copy link
Contributor Author

cjmayo commented Jun 14, 2024

Getting rid of this dependency is even better.

For the record, sticking with CCCL 2.2.0 is a workaround in the meantime.

@cjmayo cjmayo closed this Jun 14, 2024
@cjmayo cjmayo deleted the cccl branch June 14, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants