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

#### 功能说明

判断参数是否相同。


#### 定义

```
inline bool operator == (const RopeParam &left, const RopeParam &right) 
{
   return left.rotaryCoeff == right.rotaryCoeff && left.cosFormat == right.cosFormat;
}
inline bool operator==(const AllGatherVParam &left, const AllGatherVParam &right)
{
    return left.rank == right.rank && left.rankSize == right.rankSize && left.rankRoot == right.rankRoot &&
           left.hcclComm == right.hcclComm && left.commMode == right.commMode && left.backend == right.backend &&
           left.rankTableFile == right.rankTableFile && left.commDomain == right.commDomain;
}
inline bool operator==(const ReduceScatterVParam &left, const ReduceScatterVParam &right)
{
    return left.rank == right.rank && left.rankSize == right.rankSize && left.rankRoot == right.rankRoot &&
           left.sendCounts == right.sendCounts && left.sdispls == right.sdispls && left.recvCount == right.recvCount &&
           left.reduceType == right.reduceType && left.hcclComm == right.hcclComm && left.commMode == right.commMode &&
           left.backend == right.backend && left.rankTableFile == right.rankTableFile &&
           left.commDomain == right.commDomain;
}
inline bool operator==(const RopeQConcatParam &left, const RopeQConcatParam &right)
{
    (void)left;
    (void)right;
    return true;
}
inline bool operator==(const AllToAllVV2Param &left, const AllToAllVV2Param &right)
{
    return left.rank == right.rank && left.rankSize == right.rankSize && left.rankRoot == right.rankRoot &&
           left.hcclComm == right.hcclComm && left.commMode == right.commMode && left.backend == right.backend &&
           left.rankTableFile == right.rankTableFile && left.commDomain == right.commDomain;
}
inline bool operator==(const SortParam &left, const SortParam &right)
{
    return left.num == right.num;
}
inline bool operator==(const TopkToppSamplingParam &left, const TopkToppSamplingParam &right)
{
    return left.topkToppSamplingType == right.topkToppSamplingType && left.randSeeds == right.randSeeds &&
           left.randSeed == right.randSeed && left.topk == right.topk && left.logProbsSize == right.logProbsSize;
}
```
