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 % 5 5
Test Date: 2026-08-04 10:52:23 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), devLogicId(HrtGetDevice()), ccuResPackMgr(), ccuJettyMgr(devLogicId),
      28          262 :           ccuTransportMgr(*comm, devLogicId), ccuTransportGroupMgr(*comm),
      29          262 :           registeredCcuCtxMgr(devLogicId)
      30              :     {
      31          262 :     }
      32              : 
      33              :     CcuResPackMgr        *GetCcuResPackMgr();
      34              :     CcuJettyMgr          *GetCcuJettyMgr();
      35              :     CcuTransportMgr      *GetCcuTransportMgr();
      36              :     CcuTransportGroupMgr *GetCcuTransportGrpMgr();
      37              :     RegisteredCcuCtxMgr  *GetRegisteredCcuCtxMgr();
      38              :     int32_t               GetDeviceLogicId() const;
      39              :     void                  AcceleratorFallback() const;
      40              : private:
      41              :     CommunicatorImpl    *comm;
      42              :     int32_t              devLogicId;
      43              :     CcuResPackMgr        ccuResPackMgr;
      44              :     CcuJettyMgr          ccuJettyMgr;
      45              :     CcuTransportMgr      ccuTransportMgr;
      46              :     CcuTransportGroupMgr ccuTransportGroupMgr;
      47              :     RegisteredCcuCtxMgr  registeredCcuCtxMgr;
      48              : };
      49              : 
      50              : } // namespace Hccl
      51              : 
      52              : #endif // CCU_COMMUNICATOR_H
        

Generated by: LCOV version 2.0-1