[][src]Function onednn_sys::dnnl_binary_desc_init

pub unsafe extern "C" fn dnnl_binary_desc_init(
    binary_desc: *mut dnnl_binary_desc_t,
    alg_kind: dnnl_alg_kind_t,
    src0_desc: *const dnnl_memory_desc_t,
    src1_desc: *const dnnl_memory_desc_t,
    dst_desc: *const dnnl_memory_desc_t
) -> dnnl_status_t

Initializes a descriptor for a binary primitive.

@note Memory descriptor @p dst_desc is allowed to be initialized with #dnnl_format_tag_any or with format_kind set to #dnnl_format_kind_any.

@note Both memory descriptors must have the same number of dimensions. Element broadcasting is supported for memory descriptor @p src1_desc and are applied to @ src1_desc dimensions that have size equal to 1.

@param binary_desc Output descriptor for a binary primitive. @param alg_kind Algorithm kind. Valid values are #dnnl_binary_add, #dnnl_binary_mul, #dnnl_binary_max and #dnnl_binary_min. @param src0_desc Source 0 memory descriptor. @param src1_desc Source 1 memory descriptor. @param dst_desc Destination memory descriptor. @returns #dnnl_success on success and a status describing the error otherwise.