[][src]Function onednn_sys::dnnl_primitive_attr_get_scales

pub unsafe extern "C" fn dnnl_primitive_attr_get_scales(
    attr: dnnl_primitive_attr_t,
    arg: c_int,
    count: *mut dnnl_dim_t,
    mask: *mut c_int,
    scales: *mut *const f32
) -> dnnl_status_t

Returns primitive attributes scaling factors correspondence mask and values for a given memory argument.

@warning The output @p scales array is an internal part of the primitive attributes @p attr, so it is an error to modify or destroy the @p scales array.

@warning The lifetime of the @p scales array is the same as that of the primitive attributes @p attr to which it belongs, so it is an error to use @p scales after @p attr is destroyed.

@param attr Primitive attributes. @param arg Parameter argument index as passed to the dnnl_primitive_execute() call. @param count Output length of the array of scaling factors @p scales. @param mask Output scaling factors correspondence mask that defines the correspondence between the output tensor dimensions and the @p scales array. The set i-th bit indicates that a dedicated output scaling factor is used for each index along that dimension. The mask value of 0 implies a common scaling factor for the whole output tensor. @param scales Output pointer to a constant array of float scaling factors. @returns #dnnl_success on success and a status describing the error otherwise.