Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 : #ifndef HCCLV2_REDUCE_IN_H
11 : #define HCCLV2_REDUCE_IN_H
12 : #include <string>
13 : #include "data_type.h"
14 : #include "reduce_op.h"
15 : namespace Hccl {
16 :
17 : struct ReduceIn {
18 : DataType dataType;
19 : ReduceOp reduceOp;
20 69 : ReduceIn(DataType dataType, ReduceOp reduceOp) : dataType(dataType), reduceOp(reduceOp) {}
21 0 : std::string Describe() const
22 : {
23 : return StringFormat(
24 0 : "ReduceIn[dataType=%s, reduceOp=%s]", dataType.Describe().c_str(), reduceOp.Describe().c_str());
25 : }
26 : };
27 :
28 : } // namespace Hccl
29 : #endif
|