Equal
=================

逐元素计算两个输入是否相等

.. math::

    output_i = \begin{cases}
        \text{True}, & \text{if } Input0_i = Input1_i \\
        \text{False}, & \text{if } Input0_i \neq Input1_i
    \end{cases}

输入：
    - **Input0** - 第一个输入数据地址。
    - **Input1** - 第二个输入数据地址。
    - **length** - 计算长度。
    - **core_mask(int, 可选)** - 核掩码（仅适用于共享存储版本）。
    
输出：
    - **output** - 计算结果地址。

支持平台：
    ``FT78NE``
    ``MT7004``

.. note::
    - FT78NE 支持int8, int16, int32, fp32, fp64, cplx64, cplx128
    - MT7004 支持fp16, fp32, int16, int32, cplx64

**共享存储版本：**

.. c:function:: void i8_equal_s(int8_t* Input0, int8_t* Input1, bool* output,int length, int core_mask)
.. c:function:: void i16_equal_s(int16_t* Input0, int16_t* Input1, bool* output,int length, int core_mask)
.. c:function:: void i32_equal_s(int* Input0, int* Input1, bool* output,int length, int core_mask)
.. c:function:: void hp_equal_s(half* Input0, half* Input1, bool* output,int length, int core_mask)
.. c:function:: void fp_equal_s(float* Input0, float* Input1, bool* output,int length, int core_mask)
.. c:function:: void dp_equal_s(double* Input0, double* Input1, bool* output,int length, int core_mask)
.. c:function:: void c64_equal_s(float* Input0, float* Input1, bool* output,int length, int core_mask)
.. c:function:: void c128_equal_s(double* Input0, double* Input1, bool* output, int length, int core_mask)

    **C调用示例：**

    .. code-block:: c
        :linenos:
        :emphasize-lines: 11

        //FT78NE示例
        #include <stdio.h>
        #include <equal.h>

        int main(int argc, char* argv[]) {
            float *input0 = (float *)0xA0000000;   //input在DDR空间
            float *input1 = (float *)0xB0000000;
            bool *output = (bool *)0xC0000000;
            int length = 1000;
            int core_mask = 0xff;
            fp_equal_p(input0, input1, output, length, core_mask);
            return 0;
        }


**私有存储版本：**

.. c:function:: void i8_equal_p(int8_t *Input0, int8_t *Input1, bool *output, int length)
.. c:function:: void i16_equal_p(int16_t *Input0, int16_t *Input1, bool *output, int length)
.. c:function:: void i32_equal_p(int32_t *Input0, int32_t *Input1, bool *output, int length)
.. c:function:: void hp_equal_p(half* Input0, half* Input1, bool* output,int length)
.. c:function:: void fp_equal_p(float* Input0, float* Input1, bool* output,int length)
.. c:function:: void dp_equal_p(double* Input0, double* Input1, bool* output,int length)
.. c:function:: void c64_equal_p(float *Input0, float *Input1, bool *output, int length)
.. c:function:: void c128_equal_p(double *Input0, double *Input1, bool *output, int length)

    **C调用示例：**

    .. code-block:: c
        :linenos:
        :emphasize-lines: 10

        //FT78NE示例
        #include <stdio.h>
        #include <equal.h>

        int main(int argc, char* argv[]) {
            float *input0 = (float *)0x10810000;   //input在L2空间
            float *input1 = (float *)0x10820000;
            bool *output = (bool *)0x10830000;
            int length = 1000;
            fp_equal_p(input0, input1, output, length);
            return 0;
        }