Line data Source code
1 : /**
2 : * Copyright (c) 2026 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 NOTIFY_AICPU_MGR_H
12 : #define NOTIFY_AICPU_MGR_H
13 :
14 : #include "common.h"
15 : #include "aicpu_launch_manager.h"
16 : #include "local_notify.h"
17 : #include <vector>
18 : #include <memory>
19 :
20 : using namespace hccl;
21 :
22 : class NotifyAicpuMgr {
23 : public:
24 : NotifyAicpuMgr();
25 23 : ~NotifyAicpuMgr() = default;
26 : HcclResult NotifyFree(NotifyMgrAicpuParam* param);
27 : HcclResult NotifyAlloc(NotifyMgrAicpuParam* param);
28 : void ReserveNotifyCapacity(size_t n);
29 :
30 : private:
31 : std::vector<std::unique_ptr<LocalNotify>> notifys_;
32 : };
33 :
34 : #endif // NOTIFY_AICPU_MGR_H
|