LCOV - code coverage report
Current view: top level - legacy/ascend950/framework/aiv - aiv_ins_preprocessor.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 1 1
Test Date: 2026-08-17 10:19:35 Functions: 100.0 % 1 1

            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 AIV_INS_PREPROCESSOR_H
      11              : #define AIV_INS_PREPROCESSOR_H
      12              : 
      13              : #include "ins_queue.h"
      14              : #include "communicator_impl.h"
      15              : #include "mc2_type.h"
      16              : #include "connections_builder.h"
      17              : 
      18              : namespace Hccl {
      19              : 
      20              : class AivInsPreprocessor {
      21              : public:
      22              :     using InsIterator = HierarchicalQueue<Instruction, InsQueue>::Iterator;
      23              : 
      24          238 :     explicit AivInsPreprocessor(CommunicatorImpl* comm) : comm(comm) {}
      25              : 
      26              :     ~AivInsPreprocessor();
      27              : 
      28              :     void Preprocess(std::shared_ptr<InsQueue>& insQueue) const;
      29              :     std::vector<HcclAiRMAWQ> GetWqs() const;
      30              :     std::vector<HcclAiRMACQ> GetCqs() const;
      31              :     void SetProtocol(uint8_t protocol);
      32              :     uint8_t GetProtocol() const;
      33              : 
      34              : private:
      35              :     void InsPreprocess(InsIterator& insIter) const;
      36              :     void BatchBuildTransports(const vector<LinkData>& links) const;
      37              :     void BatchBuildUrmaTransports(const vector<LinkData>& links) const;
      38              : 
      39              : private:
      40              :     CommunicatorImpl* comm;
      41              :     uint8_t protocol_{0};
      42              : };
      43              : 
      44              : } // namespace Hccl
      45              : 
      46              : #endif // AIV_INS_PREPROCESSOR_H
        

Generated by: LCOV version 2.0-1