LCOV - code coverage report
Current view: top level - base_comm/resources/ccu/ccu_representation/reps/sync - ccu_rep_loc_wait_event.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 83.3 % 6 5
Test Date: 2026-08-04 10:52:23 Functions: 75.0 % 4 3

            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 HCOMM_CCU_REPRESENTATION_LOC_WAIT_EVENT_H
      12              : #define HCOMM_CCU_REPRESENTATION_LOC_WAIT_EVENT_H
      13              : 
      14              : #include "ccu_datatype_v1.h"
      15              : #include "ccu_rep_base_v1.h"
      16              : 
      17              : namespace hcomm {
      18              : namespace CcuRep {
      19              : 
      20              : class CcuRepLocWaitEvent : public CcuRepBase {
      21              : public:
      22              :     // mask 由调用方显式传入(与 CompletedEvent 解耦)。
      23              :     CcuRepLocWaitEvent(CcuInsGeneratorBase* insGenPtr, const CompletedEvent &event, uint32_t mask, bool isProfiling=true);
      24              :     bool        Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep) override;
      25              :     std::string Describe() override;
      26           47 :     uint32_t    GetMask() { return mask_; };
      27            0 :     uint32_t    GetEventId()  { return event_.Id(); };
      28              :     
      29           30 :     CompletedEvent GetEvent()
      30              :     {
      31           30 :         return event_;
      32              :     }
      33              : 
      34           30 :     bool GetIsProfiling()
      35              :     {
      36           30 :         return isProfiling_;
      37              :     }
      38              :     void SetDependencyInfo(const std::unordered_map<uint32_t, std::vector<std::shared_ptr<CcuRepBase>>>& depInfo);
      39              :     std::vector<std::shared_ptr<CcuRepBase>> GetDependencyInfo(uint32_t bit);
      40              : 
      41              : private:
      42              :     CcuInsGeneratorBase* insGenPtr{nullptr};
      43              :     CompletedEvent event_{};
      44              :     uint32_t       mask_{1};
      45              :     bool           isProfiling_{true};
      46              :     std::unordered_map<uint32_t, std::vector<std::shared_ptr<CcuRepBase>>> depInfo_;
      47              : };
      48              : 
      49              : }; // namespace CcuRep
      50              : }; // namespace hcomm
      51              : #endif // HCOMM_CCU_REPRESENTATION_LOC_WAIT_EVENT_H
        

Generated by: LCOV version 2.0-1