LCOV - code coverage report
Current view: top level - aicpu_schedule/stub - aicpusd_stub_tdtserver.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 22 22
Test Date: 2026-08-12 11:05:02 Functions: 100.0 % 9 9

            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 <list>
      12              : #include <string>
      13              : #include "aicpusd_status.h"
      14              : #include "tdt/status.h"
      15              : #include "tdt/tdt_device.h"
      16              : #include "tdt/train_mode.h"
      17              : 
      18              : #ifdef __cplusplus
      19              : namespace tdt {
      20            1 : int32_t TDTServerInit(const uint32_t deviceID, const std::list<uint32_t>& bindCoreList)
      21              : {
      22              :     (void)deviceID;
      23              :     (void)bindCoreList;
      24            1 :     aicpusd_debug("In stub function %s", __func__);
      25            1 :     return 0;
      26              : }
      27              : 
      28            1 : int32_t TDTServerStop()
      29              : {
      30            1 :     aicpusd_debug("In stub function %s", __func__);
      31            1 :     return 0;
      32              : }
      33              : 
      34          507 : StatusFactory* StatusFactory::GetInstance()
      35              : {
      36          507 :     static StatusFactory instance_;
      37          507 :     return &instance_;
      38              : }
      39              : 
      40          505 : void StatusFactory::RegisterErrorNo(const uint32_t err, const std::string& desc)
      41              : {
      42              :     (void)err;
      43              :     (void)desc;
      44          505 : }
      45              : 
      46            1 : std::string StatusFactory::GetErrDesc(const uint32_t err)
      47              : {
      48              :     (void)err;
      49            1 :     aicpusd_debug("In stub function %s", __func__);
      50            2 :     return "";
      51              : }
      52              : 
      53            1 : std::string StatusFactory::GetErrCodeDesc(uint32_t errCode)
      54              : {
      55              :     (void)errCode;
      56            1 :     aicpusd_debug("In stub function %s", __func__);
      57            2 :     return "";
      58              : }
      59              : 
      60            1 : StatusFactory::StatusFactory() {}
      61              : 
      62              : int32_t __attribute__((visibility("default")))
      63            1 : TdtDevicePushData(const std::string& channelName, std::vector<DataItem>& items)
      64              : {
      65              :     (void)channelName;
      66              :     (void)items;
      67            1 :     aicpusd_err("Not support tdt channel");
      68            1 :     return 1;
      69              : }
      70              : } // namespace tdt
      71              : 
      72            1 : void __attribute__((visibility("default"))) SetTrainMode(TrainMode mode) { (void)mode; }
      73              : 
      74              : #endif
        

Generated by: LCOV version 2.0-1