cuda::experimental::kernel_config
Defined in include/cuda/experimental/__launch/configuration.cuh
-
template<typename Dimensions, typename ...Options>
struct kernel_config Type describing a kernel launch configuration.
This type should not be constructed directly and make_config helper function should be used instead
- Template Parameters
Dimensions – cuda::experimental::hierarchy_dimensions instance that describes dimensions of thread hierarchy in this configuration object
Options – Types of options that were added to this configuration object
Public Functions
-
inline constexpr kernel_config(const Dimensions &dims, const Options&... opts)
-
inline constexpr kernel_config(const Dimensions &dims, const ::cuda::std::tuple<Options...> &opts)
-
template<typename ...NewOptions>
inline auto add(const NewOptions&... new_options) const Add a new option to this configuration.
Returns a new kernel_config that has all option and dimensions from this kernel_config with the option from the argument added to it
- Parameters
new_option – Option to be added to the configuration
-
template<typename _OtherDimensions, typename ..._OtherOptions>
inline auto combine(const kernel_config<_OtherDimensions, _OtherOptions...> &__other_config) const Combine this configuration with another configuration object.
Returns a new
kernel_config
that is a combination of this configuration and the configuration from argument. It contains dimensions that are combination of dimensions in this object and the other configuration. The resulting hierarchy holds levels present in both hierarchies. In case of overlap of levels hierarchy from this configuration is prioritized, so the result always holds all levels from this hierarchy and non-overlapping levels from the other hierarchy. This behavior is the same ascombine()
member function of the hierarchy type. The result also contains configuration options from both configurations. In case the same type of a configuration option is present in both configuration this configuration is copied into the resulting configuration.- Parameters
__other_config – Other configuration to combine with this configuration
-
template<typename _Kernel>
inline auto combine_with_default(const _Kernel &__kernel) const Combine this configuration with default configuration of a kernel functor.
Returns a new
kernel_config
that is a combination of this configuration and a default configuration from the kernel argument. Default configuration is akernel_config
object returned fromdefault_config()
member function of the kernel type. The configurations are combined using thecombine()
member function of this configuration. If the kernel has no default configuration, a copy of this configuration is returned without any changes.- Parameters
__kernel – Kernel functor to search for the default configuration