LCOV - code coverage report
Current view: top level - legacy/ascend950/unified_platform/resource/notify - rts_1ton_cnt_notify.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 1 1
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 HCCLV2_RTS_1TON_CNT_NOTIFY_H
      12              : #define HCCLV2_RTS_1TON_CNT_NOTIFY_H
      13              : 
      14              : #include <memory>
      15              : #include <string>
      16              : #include "stream.h"
      17              : #include "orion_adapter_rts.h"
      18              : #include "orion_adapter_hccp.h"
      19              : 
      20              : namespace Hccl {
      21              : 
      22              : class BaseTask;
      23              : class Rts1ToNCntNotify {
      24              : public:
      25              :     Rts1ToNCntNotify();
      26              :     ~Rts1ToNCntNotify();
      27              :     std::unique_ptr<BaseTask> PostValue(u32 value);
      28              :     std::unique_ptr<BaseTask> WaitBits(u32 bitValue);
      29              :     void PostValue(u32 value, const aclrtStream& rtStream) const;
      30              :     void PostValue(u32 value, const Stream& stream) const;
      31              :     void WaitBits(u32 bitValue, u32 timeout, const Stream& stream) const;
      32              : 
      33              :     std::string Describe() const;
      34              : 
      35            6 :     u32 GetId() const { return id; }
      36              : 
      37              :     std::vector<char> GetUniqueId() const;
      38              : 
      39              : private:
      40              :     u32 deviceId;
      41              :     u32 devPhyId;
      42              :     RtCntNotify_t handle{nullptr};
      43              :     u32 id{0};
      44              : };
      45              : 
      46              : } // namespace Hccl
      47              : 
      48              : #endif // HCCLV2_RTS_1TON_CNT_NOTIFY_H
        

Generated by: LCOV version 2.0-1