Fix non-nvcc Thrust compilation#108
Open
pdziekan wants to merge 10 commits into
Open
Conversation
replace sprintf by snprintf (macOS deprecation)
Merge for 1.85
Merge for 1.86
Merge CML fix into 1.86
Merge to Master for 1.87
Merge to Master for 1.91
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Replaces CUDA-specific __host__ __device__ annotations with the CCCL portable macro _CCCL_HOST_DEVICE across the thrust integration code, examples, and documentation.
Changes:
- Swap
__host__ __device__for_CCCL_HOST_DEVICEin thrust algebra/operations headers. - Update thrust example
.cufiles to use the new macro. - Update tutorial documentation accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| include/boost/numeric/odeint/external/thrust/thrust_operations.hpp | Replace CUDA annotations with _CCCL_HOST_DEVICE macro in all operation functors. |
| include/boost/numeric/odeint/external/thrust/thrust_algebra.hpp | Replace CUDA annotations in maximum functor. |
| examples/thrust/relaxation.cu | Use _CCCL_HOST_DEVICE in the relaxation functor. |
| examples/thrust/phase_oscillator_ensemble.cu | Use _CCCL_HOST_DEVICE in sin/cos/sys functors. |
| examples/thrust/phase_oscillator_chain.cu | Use _CCCL_HOST_DEVICE in sys_functor. |
| examples/thrust/lorenz_parameters.cu | Use _CCCL_HOST_DEVICE in Lorenz functors. |
| doc/tutorial_thrust_cuda.qbk | Update tutorial to reflect new macro usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| template< class Tuple > | ||
| __host__ __device__ | ||
| _CCCL_HOST_DEVICE |
| [thrust_phase_ensemble_mean_field_calculator] | ||
|
|
||
| Inside this class two member structures `sin_functor` and `cos_functor` are defined. They compute the sine and the cosine of a value and they are used within a transform iterator to calculate the sum of ['sin(__phi[subl k])] and ['cos(__phi[subl k])]. The classifiers `__host__` and `__device__` are CUDA specific and define a function or operator which can be executed on the GPU as well as on the CPU. The line | ||
| Inside this class two member structures `sin_functor` and `cos_functor` are defined. They compute the sine and the cosine of a value and they are used within a transform iterator to calculate the sum of ['sin(__phi[subl k])] and ['cos(__phi[subl k])]. The macro '_CCCL_HOST_DEVICE' defines a function or operator which can be executed on the GPU as well as on the CPU if compiled with nvcc. The line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #109