LCOV - code coverage report
Current view: top level - legacy/ascend950/framework/ccu - ccu_communicator.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 9 9
Test Date: 2026-08-18 17:47:01 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              : 
      11              : #ifndef CCU_COMMUNICATOR_H
      12              : #define CCU_COMMUNICATOR_H
      13              : 
      14              : #include "types.h"
      15              : #include "ccu_respack_mgr.h"
      16              : #include "ccu_jetty_mgr.h"
      17              : #include "ccu_transport_manager.h"
      18              : #include "ccu_registered_ctx_mgr.h"
      19              : #include "ccu_transport_group_manager.h"
      20              : #include "orion_adapter_rts.h"
      21              : 
      22              : namespace Hccl {
      23              : 
      24              : class CcuCommunicator {
      25              : public:
      26          262 :     explicit CcuCommunicator(CommunicatorImpl* comm)
      27          262 :         : comm(comm),
      28          262 :           devLogicId(HrtGetDevice()),
      29          262 :           ccuResPackMgr(),
      30          262 :           ccuJettyMgr(devLogicId),
      31          262 :           ccuTransportMgr(*comm, devLogicId),
      32          262 :           ccuTransportGroupMgr(*comm),
      33          262 :           registeredCcuCtxMgr(devLogicId)
      34          262 :     {}
      35              : 
      36              :     CcuResPackMgr* GetCcuResPackMgr();
      37              :     CcuJettyMgr* GetCcuJettyMgr();
      38              :     CcuTransportMgr* GetCcuTransportMgr();
      39              :     CcuTransportGroupMgr* GetCcuTransportGrpMgr();
      40              :     RegisteredCcuCtxMgr* GetRegisteredCcuCtxMgr();
      41              :     int32_t GetDeviceLogicId() const;
      42              :     void AcceleratorFallback() const;
      43              : 
      44              : private:
      45              :     CommunicatorImpl* comm;
      46              :     int32_t devLogicId;
      47              :     CcuResPackMgr ccuResPackMgr;
      48              :     CcuJettyMgr ccuJettyMgr;
      49              :     CcuTransportMgr ccuTransportMgr;
      50              :     CcuTransportGroupMgr ccuTransportGroupMgr;
      51              :     RegisteredCcuCtxMgr registeredCcuCtxMgr;
      52              : };
      53              : 
      54              : } // namespace Hccl
      55              : 
      56              : #endif // CCU_COMMUNICATOR_H
        

Generated by: LCOV version 2.0-1