cuda::experimental::coop::level_synchronizer#
namespace cuda::experimental::coop {
class level_synchronizer
{
public:
explicit level_synchronizer() = default;
template <typename Unit, typename ParentGroup, typename MappingResult>
[[nodiscard]] __device__
auto make_instance(const Unit&, const ParentGroup&, const MappingResult&) const noexcept;
};
} // namespace cuda::experimental::coop
Overview#
cuda::experimental::coop::level_synchronizer is a synchronizer that synchronizes all threads within the group’s level. The synchronization behaviour is equivalent to:
Level |
|
|
|---|---|---|
Thread |
Noop |
Noop |
Warp |
|
|
Block |
|
|
Cluster |
Cluster barrier arrive + wait |
Aligned cluster barrier arrive + wait |
Grid |
|
|
Note
Grid synchronization requires a cooperative kernel launch on a device that supports it. With cuda::launch, include cuda::cooperative_launch{} in the configuration passed to cuda::make_config.
The type is empty and is explicitly default constructible.