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 CCU_WQEBB_MGR_V2_H
12 : #define CCU_WQEBB_MGR_V2_H
13 :
14 : #include <memory>
15 : #include <vector>
16 :
17 : #include "ccu_wqebb_mgr.h"
18 :
19 : namespace hcomm {
20 :
21 : class CcuWqeBBMgrV2 : public CcuWqeBBMgr {
22 : public:
23 61 : CcuWqeBBMgrV2(const int32_t devLogicId, const uint8_t dieId) : CcuWqeBBMgr(devLogicId, dieId) {}
24 : CcuWqeBBMgrV2() = default;
25 114 : ~CcuWqeBBMgrV2() override final = default;
26 :
27 : HcclResult Init() override final;
28 : HcclResult Alloc(const WqeBBReq& wqeBBReq, ResInfo& wqeBBInfo) override final;
29 : HcclResult Release(const ResInfo& wqeBBInfo) override final;
30 :
31 : private:
32 : std::vector<bool> allocatedWqeBBBlocks_; // 记录当前所有jetty的分配状态
33 : };
34 :
35 : }; // namespace hcomm
36 :
37 : #endif // CCU_WQEBB_MGR_V2_H
|