struct dnnl::reduction::desc

Overview

Descriptor for reduction. More…

#include <dnnl.hpp>

struct desc
{
    // fields

    dnnl_reduction_desc_t data;

    // construction

    desc();

    desc(
        algorithm aalgorithm,
        const memory::desc& src_desc,
        const memory::desc& dst_desc,
        float p,
        float eps
        );
};

Detailed Documentation

Descriptor for reduction.

Construction

desc()

Default constructor. Produces an empty object.

desc(
    algorithm aalgorithm,
    const memory::desc& src_desc,
    const memory::desc& dst_desc,
    float p,
    float eps
    )

Constructs a descriptor for a reduction primitive using algorithm specific parameters, source and destination memory descriptors.

Note

Destination memory descriptor may be initialized with dnnl::memory::format_tag::any value of format_tag.

Parameters:

aalgorithm

reduction algorithm kind. Possible values: dnnl_reduction_max, dnnl_reduction_min, dnnl_reduction_sum, dnnl_reduction_mul, dnnl_reduction_mean, dnnl_reduction_norm_lp_max, dnnl_reduction_norm_lp_sum, dnnl_reduction_norm_lp_power_p_max, dnnl_reduction_norm_lp_power_p_sum.

p

algorithm specific parameter.

eps

algorithm specific parameter.

src_desc

Source memory descriptor.

dst_desc

Destination memory descriptor.