LCOV - code coverage report
Current view: top level - aicpu_processer/stub - aicpu_context.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 58.3 % 24 14
Test Date: 2026-07-28 10:54:05 Functions: 44.4 % 9 4

            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 "aicpu_context.h"
      12              : #include <unistd.h>
      13              : 
      14              : namespace aicpu {
      15            0 : status_t SetOpname(const std::string &opname)
      16              : {
      17            0 :     return AICPU_ERROR_NONE;
      18              : }
      19              : 
      20            0 : status_t SetThreadLocalCtx(const std::string &key, const std::string &value)
      21              : {
      22            0 :     return AICPU_ERROR_NONE;
      23              : }
      24              : 
      25            0 : status_t GetThreadLocalCtx(const std::string &key, std::string &value)
      26              : {
      27            0 :     return AICPU_ERROR_NONE;
      28              : }
      29              : 
      30           14 : status_t aicpuGetContext(aicpuContext_t *ctx)
      31              : {
      32           14 :     if (ctx != nullptr) {
      33           14 :         ctx->deviceId = 0;
      34           14 :         ctx->tsId = 0;
      35           14 :         ctx->vfId = 0;
      36           14 :         ctx->hostPid = getpid();
      37              :     }
      38           14 :     return AICPU_ERROR_NONE;
      39              : }
      40              : 
      41           19 : status_t GetAicpuRunMode(uint32_t &runMode)
      42              : {
      43           19 :     runMode = aicpu::THREAD_MODE;
      44           19 :     return AICPU_ERROR_NONE;
      45              : }
      46              : 
      47           32 : uint32_t GetUniqueVfId()
      48              : {
      49           32 :     return 0U;
      50              : }
      51              : 
      52            0 : void SetUniqueVfId(const uint32_t uniqueVfId)
      53              : {
      54              :     (void)uniqueVfId;
      55            0 : }
      56              : 
      57            0 : void SetCustAicpuSdFlag(const bool isCustAicpuSdFlag)
      58              : {
      59              :     (void)isCustAicpuSdFlag;
      60            0 : }
      61              : 
      62            8 : bool IsCustAicpuSd()
      63              : {
      64            8 :     return false;
      65              : }
      66              : }  // namespace aicpu
        

Generated by: LCOV version 2.0-1