.. index:: pair: group; Sum .. _doxid-group__dnnl__api__sum: Sum === .. toctree:: :hidden: struct_dnnl_sum.rst Overview ~~~~~~~~ A primitive to sum multiple tensors. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl::sum`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_sum_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* sum_primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` dst_desc, int n, const float* scales, :ref:`const_dnnl_memory_desc_t` const* src_descs, :ref:`const_dnnl_primitive_attr_t` attr ); .. _details-group__dnnl__api__sum: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to sum multiple tensors. .. rubric:: See also: :ref:`Sum ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_sum_primitive_desc_create .. _doxid-group__dnnl__api__sum_1ga10b304125badf7e33eea8ddead1f2e3e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_sum_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* sum_primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` dst_desc, int n, const float* scales, :ref:`const_dnnl_memory_desc_t` const* src_descs, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for an (out-of-place) sum primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - sum_primitive_desc - Output primitive descriptor. * - dst_desc - Destination memory descriptor. * - n - Number of source parameters. * - scales - Vector of scales to multiply data in each source memory by. * - src_descs - Array of source memory descriptors having ``n`` elements. * - attr - Primitive attributes to use (can be NULL). * - engine - Engine to use. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.