-
Notifications
You must be signed in to change notification settings - Fork 199
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
make the empty parens after level constructors optional #2750
Conversation
For example, what before needed to be written as: ```cpp cudax::make_hierarchy(cudax::block_dims<block_size>(), cudax::grid_dims<grid_size>()) ``` can now be written as: ```cpp cudax::make_hierarchy(cudax::block_dims<block_size>, cudax::grid_dims<grid_size>) ```
🟩 CI finished in 53m 50s: Pass: 100%/54 | Total: 4h 04m | Avg: 4m 31s | Max: 18m 31s | Hits: 89%/238
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
+/- | CUDA Experimental |
python | |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
+/- | CUDA Experimental |
python | |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 54)
# | Runner |
---|---|
43 | linux-amd64-cpu16 |
5 | linux-amd64-gpu-v100-latest-1 |
4 | linux-arm64-cpu16 |
2 | windows-amd64-cpu16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into it
else | ||
|
||
template <typename L1, typename... Levels> | ||
_CCCL_NODISCARD _CUDAX_API constexpr auto operator()(const L1& l1, const Levels&... ls) const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can now drop l1
? It was needed previously for the can_stack
, but now I think it's always used along with the ls pack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__can_stack
wants to compare the shifted list of levels. we need to separate out L1
here so we can easily shift the levels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, its not as easy as I thought, I had to also change __can_stack
to not be an alias, not sure if its worth it.
Feel free to revert my change here
// TODO accept forwarding references | ||
template <typename LUnit, typename L1, typename... Levels> | ||
_CCCL_HOST_DEVICE constexpr auto | ||
operator&(const hierarchy_dimensions_fragment<LUnit, Levels...>& ls, const L1& l1) noexcept | ||
_CUDAX_API constexpr auto operator&(const hierarchy_dimensions_fragment<LUnit, Levels...>& ls, L1 l1) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: With the changes I noticed how bad L1/l1 name is here, its a copy paste from other places probably. Maybe new_level
or similar would be better here?
🟩 CI finished in 54m 34s: Pass: 100%/54 | Total: 4h 44m | Avg: 5m 15s | Max: 17m 25s | Hits: 63%/238
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
+/- | CUDA Experimental |
python | |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
+/- | CUDA Experimental |
python | |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 54)
# | Runner |
---|---|
43 | linux-amd64-cpu16 |
5 | linux-amd64-gpu-v100-latest-1 |
4 | linux-arm64-cpu16 |
2 | windows-amd64-cpu16 |
For example, what before needed to be written as:
cudax::make_hierarchy(cudax::block_dims<block_size>(), cudax::grid_dims<grid_size>())
can now be written as:
cudax::make_hierarchy(cudax::block_dims<block_size>, cudax::grid_dims<grid_size>)
This syntax cannot be made to work with
operator&
. For example, this will not compile:cudax::block_dims<block_size> & cudax::grid_dims<grid_size> // compile error
Checklist