Intel® Math Kernel Library 2018 Developer Reference - C

dnnSumCreate

Creates sum layers.

Syntax

dnnError_t dnnSumCreate_F32 (dnnPrimitive_t *pSum, dnnPrimitiveAttributes_t attributes, const size_t nSummands, dnnLayout_t dataLayout, float *coefficients);

dnnError_t dnnSumCreate_F64 (dnnPrimitive_t *pSum, dnnPrimitiveAttributes_t attributes, const size_t nSummands, dnnLayout_t dataLayout, float *coefficients);

Include Files

Input Parameters

attributes

The set of attributes for the primitive.

nSummands

The number of input layouts.

dataLayout

Pointer to the layout of the input.

coefficients

Coefficients of input tensors in the weighted sum.

Output Parameters

pSum

Pointer to the primitive to create.

Description

Each dnnSumCreate function creates a sum primitive. The sum (weighted) of N tensors of the same sizes is defined as: