LCOV - code coverage report
Current view: top level - adcore/common - create_func.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 8 8
Test Date: 2026-07-28 10:54:24 Functions: 100.0 % 2 2

            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              : #include "epoll/adx_hdc_epoll.h"
      12              : #include "commopts/hdc_comm_opt.h"
      13              : #include "create_func.h"
      14              : namespace Adx {
      15            4 : std::unique_ptr<AdxEpoll> CreateAdxEpoll(EpollType epollType)
      16              : {
      17            4 :     if (epollType == EpollType::EPOLL_HDC) {
      18            3 :         return std::unique_ptr<AdxEpoll>(new(std::nothrow)AdxHdcEpoll);
      19              :     }
      20            1 :     return nullptr;
      21              : }
      22              : 
      23           77 : std::unique_ptr<AdxCommOpt> CreateAdxCommOpt(OptType optType)
      24              : {
      25           77 :     if (optType == OptType::COMM_HDC) {
      26           76 :         return std::unique_ptr<AdxCommOpt>(new(std::nothrow)HdcCommOpt);
      27              :     }
      28            1 :     return nullptr;
      29              : }
      30              : }
        

Generated by: LCOV version 2.0-1