---
title: operator==
description: "判断参数是否相同。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0106.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0106.html
indexId: def4842ac26c50ea8ad801135ce75337840388ef628545bb31eb5a748dfd660d64
---
# operator==

#### 功能说明

判断参数是否相同。


#### 定义

```
inline bool operator==(const GenAttentionMaskParam &left, const GenAttentionMaskParam &right)
{
    return left.headNum == right.headNum && left.seqLen == right.seqLen;
}
inline bool operator==(const RopeGradParam &left, const RopeGradParam &right)
{
    return left.qSeqLen == right.qSeqLen;
}
inline bool operator==(const FastSoftMaxParam &left, const FastSoftMaxParam &right)
{
    return left.headNum == right.headNum && left.qSeqLen == right.qSeqLen;
}
inline bool operator==(const FastSoftMaxGradParam &left, const FastSoftMaxGradParam &right)
{
    return left.headNum == right.headNum && left.qSeqLen == right.qSeqLen;
}
inline bool operator==(const StridedBatchMatmulParam &left, const StridedBatchMatmulParam &right)
{
    return left.transposeA == right.transposeA && left.transposeB == right.transposeB && left.batch == right.batch &&
           left.headNum == right.headNum && left.m == right.m && left.n == right.n && left.k == right.k &&
           left.lda == right.lda && left.ldb == right.ldb && left.ldc == right.ldc && left.strideA == right.strideA &&
           left.strideB == right.strideB && left.strideC == right.strideC;
}
inline bool operator==(const UnpadWithHiddenStateParam &left, const UnpadWithHiddenStateParam &right)
{
    return left.qSeqLen == right.qSeqLen && left.maxSeqLen == right.maxSeqLen;
}
inline bool operator==(const PadWithHiddenStateParam &left, const PadWithHiddenStateParam &right)
{
    return left.qSeqLen == right.qSeqLen && left.maxSeqLen == right.maxSeqLen;
}
```
