LCOV - code coverage report
Current view: top level - legacy/ascend910/pub_inc - remote_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 REMOTE_NOTIFY_H
      12              : #define REMOTE_NOTIFY_H
      13              : 
      14              : #include "stream_pub.h"
      15              : #include "dispatcher.h"
      16              : 
      17              : namespace hccl {
      18              : class RemoteNotifyImpl;
      19              : class RemoteNotify {
      20              : public:
      21              :     RemoteNotify();
      22              :     ~RemoteNotify();
      23              :     HcclResult Init(const std::vector<u8>& byteVector);
      24              :     HcclResult Init(const HcclSignalInfo& notifyInfo, const NotifyLoadType type = NotifyLoadType::DEVICE_NOTIFY);
      25              : 
      26              :     HcclResult Open();
      27              :     HcclResult Close();
      28              :     HcclResult Post(Stream& stream, HcclDispatcher dispatcher, s32 stage = INVALID_VALUE_STAGE);
      29              :     HcclResult GetNotifyData(HcclSignalInfo& notifyInfo);
      30              :     HcclResult SetNotifyData(HcclSignalInfo& notifyInfo);
      31              : 
      32              :     // 仅限dispatcher使用,使用时需判空
      33            1 :     inline HcclRtNotify ptr() { return notifyPtr; }
      34              :     // 获取offset
      35              :     HcclResult GetNotifyOffset(u64& notifyOffset);
      36              : 
      37              : private:
      38              :     std::unique_ptr<RemoteNotifyImpl> pimpl_;
      39              :     HcclRtNotify notifyPtr;
      40              : };
      41              : 
      42              : } // namespace hccl
      43              : 
      44              : #endif // REMOTE_NOTIFY_H
        

Generated by: LCOV version 2.0-1