.. index:: pair: group; Resampling .. _doxid-group__dnnl__api__resampling: Resampling ========== .. toctree:: :hidden: struct_dnnl_resampling_backward.rst struct_dnnl_resampling_forward.rst Overview ~~~~~~~~ A primitive to compute resampling operation on 1D, 2D or 3D data tensor using Nearest Neighbor, or Linear (Bilinear, Trilinear) interpolation method. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl::resampling_backward`; struct :ref:`dnnl::resampling_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_resampling_forward_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`dnnl_alg_kind_t` alg_kind, const float* factors, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`const_dnnl_primitive_attr_t` attr ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_resampling_backward_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_alg_kind_t` alg_kind, const float* factors, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ); .. _details-group__dnnl__api__resampling: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to compute resampling operation on 1D, 2D or 3D data tensor using Nearest Neighbor, or Linear (Bilinear, Trilinear) interpolation method. .. rubric:: See also: :ref:`Resampling ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_resampling_forward_primitive_desc_create .. _doxid-group__dnnl__api__resampling_1gad374ec6e08ef55ed8fa3682bfae490d8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_resampling_forward_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`dnnl_alg_kind_t` alg_kind, const float* factors, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for a resampling forward propagation primitive. .. note:: Destination memory descriptor is allowed to be initialized with :ref:`dnnl_format_tag_any ` or with format_kind set to :ref:`dnnl_format_kind_any `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - primitive_desc - Output primitive descriptor. * - engine - Engine to use. * - prop_kind - Propagation kind. Possible values are :ref:`dnnl_forward_training ` and :ref:`dnnl_forward_inference `. * - alg_kind - resampling algorithm kind: either :ref:`dnnl_resampling_nearest `, or :ref:`dnnl_resampling_linear `. * - factors - Array of scaling factors for spatial dimension. * - src_desc - Source memory descriptor. * - dst_desc - Destination memory descriptor. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_resampling_backward_primitive_desc_create .. _doxid-group__dnnl__api__resampling_1gab4380bb763c173e0b3b3122132b14868: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_resampling_backward_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_alg_kind_t` alg_kind, const float* factors, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for a resampling backward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - primitive_desc - Output primitive descriptor. * - engine - Engine to use. * - alg_kind - resamplinging algorithm kind: either :ref:`dnnl_resampling_nearest `, or :ref:`dnnl_resampling_linear `. * - diff_src_desc - Diff source memory descriptor. * - diff_dst_desc - Diff destination memory descriptor. * - factors - Array of scaling factors for spatial dimension. * - hint_fwd_pd - Primitive descriptor for a respective forward propagation primitive. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.