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 QUEUE_PROCESS_CCPU_H 12 : #define QUEUE_PROCESS_CCPU_H 13 : 14 : #include <map> 15 : #include <string> 16 : #include "queue_process.h" 17 : 18 : namespace acl { 19 : class QueueProcessorCcpu : public QueueProcessor { 20 : public: 21 : aclError acltdtCreateQueue(const acltdtQueueAttr *const attr, uint32_t *const qid) override; 22 : 23 : aclError acltdtDestroyQueue(const uint32_t qid) override; 24 : 25 : aclError acltdtBindQueueRoutes(acltdtQueueRouteList *const qRouteList) override; 26 : 27 : aclError acltdtUnbindQueueRoutes(acltdtQueueRouteList *const qRouteList) override; 28 : 29 : aclError acltdtQueryQueueRoutes(const acltdtQueueRouteQueryInfo *const queryInfo, 30 : acltdtQueueRouteList *const qRouteList) override; 31 : 32 : aclError acltdtAllocBuf(const size_t size, const uint32_t type, acltdtBuf *const buf) override; 33 : 34 : aclError acltdtCreateGroup(); 35 : 36 : aclError QueryGroup(const int32_t pid, size_t &grpNum, std::string &grpName) const; 37 : 38 : aclError MbufInit() const; 39 : 40 6 : QueueProcessorCcpu() = default; 41 6 : ~QueueProcessorCcpu() override = default; 42 : 43 : // not allow copy constructor and assignment operators 44 : QueueProcessorCcpu(const QueueProcessorCcpu &) = delete; 45 : 46 : QueueProcessorCcpu &operator=(const QueueProcessorCcpu &) = delete; 47 : 48 : QueueProcessorCcpu(QueueProcessorCcpu &&) = delete; 49 : 50 : QueueProcessorCcpu &&operator=(QueueProcessorCcpu &&) = delete; 51 : }; 52 : } 53 : 54 : #endif // QUEUE_PROCESS_CCPU_H