From: Matt Borland (matt_at_[hidden])
Date: 2024-08-07 14:43:59


> > Now in the code base for example instead of using std::pair you use boost::math::pair which aliases to either thrust::pair or std::pair depending on context.
>

> What exactly do you mean by "depending on context"? I see a define based
> on which either one is chosen.

Since CUDA can use a range of host compilers the context is a CUDA environment for the determination of thrust vs std containers.

> First thing that comes to my mind is: ODR violation.
> How do you avoid this when using such defines in headers?
> What is the benefit of implicitly using the CUDA types? Can you really
> use either in place of the other without being aware of that?
>

Not only can you use the CUDA types in place of the std types you have to since the std:: types simply do not exist in the libcu++ standard library. This avoids the ODR issue as well. They are all designed to be drop in replacements it seems because the NVIDIA docs direct you to cppreference: https://nvidia.github.io/cccl/libcudacxx/standard_api/utility_library/tuple.html#libcudacxx-standard-api-utility-tuple

> > 1) Would these utilities be useful to you?
> > 2) If yes, do you think that Boost.Config is the right home for them?
>

> I would definitely make that a separate library with proper
> documentation, motivation and examples.
> Yes that might be small, but so are other base-libraries in Boost.
> That would also be the place to answer the why, where and how it is

That's fair, and seems to be the consensus so far.

Matt