{% extends "config_template" %}

{% macro get_header_guard() %}
ROCPRIM_DEVICE_DETAIL_CONFIG_DEVICE_REDUCE_BY_KEY_HPP_
{%- endmacro %}

{% macro kernel_configuration(measurement) -%}
reduce_by_key_config_params{
    { {{ measurement['cfg']['bs'] }}, {{ measurement['cfg']['ipt'] }} },
    block_load_method::block_load_transpose,
    block_load_method::block_load_transpose,
    block_scan_algorithm::using_warp_scan }
{%- endmacro %}

{% macro config_picker() -%}
template<class Target, class key_type, class value_type> constexpr auto reduce_by_key_config_picker()
{%- endmacro %}

{% macro enable_if(benchmark_of_target) -%}
{{ benchmark_of_target.get_enable_if("reduce_by_key_config_params") }}
{%- endmacro %}

{% macro default_case() -%}
return reduce_by_key_config_params_base<key_type, value_type>();
{%- endmacro %}

{% macro fallback_config(fallback_target) -%}
    return reduce_by_key_config_picker<comp_target<{{ fallback_target.target.as_str() }}>, key_type, value_type>();
{%- endmacro %}
