LCOV - code coverage report
Current view: top level - src/api_check - kernel_check_util.cpp (source / functions) Coverage Total Hit
Test: coverage.info_filtered Lines: 10.8 % 369 40
Test Date: 2026-07-27 14:41:20 Functions: 11.1 % 63 7

            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              : /*!
      12              :  * \file kernel_check_util.cpp
      13              :  * \brief
      14              :  */
      15              : 
      16              : #include "kernel_check_util.h"
      17              : #include "kernel_cpu_check.h"
      18              : #include "kernel_check_params.h"
      19              : 
      20              : namespace AscendC {
      21              : namespace check {
      22              : 
      23              : #define ASCENDC_CHECK_INTRI_NAME(intriName)                                             \
      24              :     do {                                                                                \
      25              :         if ((intriName == nullptr) || (intriName != nullptr && intriName[0] == '\0')) { \
      26              :             CHECK_LOG_ERROR("intriName is null.");                                      \
      27              :             return false;                                                               \
      28              :         }                                                                               \
      29              :     } while (0)
      30              : 
      31           16 : bool CheckFuncCopyImplForMaskArray(CopyApiParams& chkParams, const uint64_t mask[2], const char* intriName)
      32              : {
      33           16 :     ASCENDC_CHECK_INTRI_NAME(intriName);
      34           16 :     check::TikcppCopyCheck chkIns{intriName, chkParams};
      35           48 :     if (!chkIns.CheckAllLowLevel({mask[1], mask[0]})) {
      36            8 :         return false;
      37              :     }
      38            8 :     return true;
      39           16 : }
      40              : 
      41           16 : bool CheckFuncCopyImpl(CopyApiParams& chkParams, const uint64_t mask, const char* intriName)
      42              : {
      43           16 :     ASCENDC_CHECK_INTRI_NAME(intriName);
      44           16 :     check::TikcppCopyCheck chkIns{intriName, chkParams};
      45           48 :     if (!chkIns.CheckAllLowLevel({mask})) {
      46            8 :         return false;
      47              :     }
      48            8 :     return true;
      49           16 : }
      50              : 
      51            0 : bool CheckFuncCopyImpl(CopyApiParams& chkParams, const char* intriName)
      52              : {
      53            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
      54            0 :     check::TikcppCopyCheck chkIns{intriName, chkParams};
      55            0 :     if (!chkIns.CheckAllHighLevel()) {
      56            0 :         return false;
      57              :     }
      58            0 :     return true;
      59            0 : }
      60              : 
      61            4 : bool CheckFuncDataCopyImpl(DataCopyApiParams& chkParams, const char* intriName)
      62              : {
      63            4 :     ASCENDC_CHECK_INTRI_NAME(intriName);
      64            4 :     check::TikcppDataCopyCheck chkIns{intriName, chkParams};
      65            4 :     if (!chkIns.CheckAllHighLevel()) {
      66            4 :         return false;
      67              :     }
      68            0 :     return true;
      69            4 : }
      70              : 
      71            0 : bool CheckFuncDataCopyPadImpl(DataCopyPadApiParams& chkParams, const char* intriName)
      72              : {
      73            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
      74            0 :     check::TikcppDataCopyPadCheck chkIns{intriName, chkParams};
      75            0 :     if (!chkIns.CheckAllHighLevel()) {
      76            0 :         return false;
      77              :     }
      78            0 :     return true;
      79            0 : }
      80              : 
      81           52 : bool CheckFuncDataCopySliceImpl(DataCopySliceApiParams& chkParams, const char* intriName)
      82              : {
      83           52 :     ASCENDC_CHECK_INTRI_NAME(intriName);
      84           52 :     check::TikcppDataCopySliceCheck chkIns{intriName, chkParams};
      85           52 :     if (!chkIns.CheckAllHighLevel()) {
      86           48 :         return false;
      87              :     }
      88            4 :     return true;
      89           52 : }
      90              : 
      91            0 : bool CheckFuncMmadImpl(MmadApiParams& chkParams, const char* intriName)
      92              : {
      93            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
      94            0 :     check::TikcppMmadCheck chkIns{intriName, chkParams};
      95            0 :     if (!chkIns.CheckAllHighLevel()) {
      96            0 :         return false;
      97              :     }
      98            0 :     return true;
      99            0 : }
     100              : 
     101            0 : bool CheckFuncVecBinaryImplForMaskArray(VecBinaryApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     102              : {
     103            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     104            0 :     check::TikcppVecBinaryCheck chkIns{intriName, chkParams};
     105            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     106            0 : }
     107              : 
     108            0 : bool CheckFuncVecBinaryImpl(VecBinaryApiParams& chkParams, const uint64_t mask, const char* intriName)
     109              : {
     110            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     111            0 :     check::TikcppVecBinaryCheck chkIns{intriName, chkParams};
     112            0 :     return chkIns.CheckAllLowLevel({mask});
     113            0 : }
     114              : 
     115            0 : bool CheckFuncVecBinaryImpl(VecBinaryApiParams& chkParams, const char* intriName)
     116              : {
     117            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     118            0 :     check::TikcppVecBinaryCheck chkIns{intriName, chkParams};
     119            0 :     return chkIns.CheckAllHighLevel();
     120            0 : }
     121              : 
     122            0 : bool CheckFuncVecSelectImplForMaskArray(VecSelectApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     123              : {
     124            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     125            0 :     check::TikcppSelectBinaryCheck chkIns{intriName, chkParams};
     126            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     127            0 : }
     128              : 
     129            0 : bool CheckFuncVecSelectImpl(VecSelectApiParams& chkParams, const uint64_t mask, const char* intriName)
     130              : {
     131            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     132            0 :     check::TikcppSelectBinaryCheck chkIns{intriName, chkParams};
     133            0 :     return chkIns.CheckAllLowLevel({mask});
     134            0 : }
     135              : 
     136            0 : bool CheckFuncVecSelectImpl(VecSelectApiParams& chkParams, const char* intriName)
     137              : {
     138            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     139            0 :     check::TikcppSelectBinaryCheck chkIns{intriName, chkParams};
     140            0 :     return chkIns.CheckAllHighLevel();
     141            0 : }
     142              : 
     143            0 : bool CheckFuncVecBinaryCmpImplForMaskArray(VecBinaryApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     144              : {
     145            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     146            0 :     check::TikcppVecBinaryCheck chkIns{intriName, chkParams};
     147            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     148            0 : }
     149              : 
     150            0 : bool CheckFuncVecCmpRgtImplForMaskArray(VecCmpRgtApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     151              : {
     152            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     153            0 :     check::TikcppVecCmpRgtCheck chkIns{intriName, chkParams};
     154            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     155            0 : }
     156              : 
     157            0 : bool CheckFuncVecCmpRgtImpl(VecCmpRgtApiParams& chkParams, const uint64_t mask, const char* intriName)
     158              : {
     159            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     160            0 :     check::TikcppVecCmpRgtCheck chkIns{intriName, chkParams};
     161            0 :     return chkIns.CheckAllLowLevel({mask});
     162            0 : }
     163              : 
     164            0 : bool CheckFuncVecBinaryCmpImpl(VecBinaryApiParams& chkParams, const uint64_t mask, const char* intriName)
     165              : {
     166            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     167            0 :     check::TikcppVecBinaryCheck chkIns{intriName, chkParams};
     168            0 :     return chkIns.CheckAllLowLevel({mask});
     169            0 : }
     170              : 
     171            0 : bool CheckFuncVecBinaryCmpImpl(VecBinaryApiParams& chkParams, const char* intriName)
     172              : {
     173            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     174            0 :     check::TikcppVecBinaryCheck chkIns{intriName, chkParams};
     175            0 :     return chkIns.CheckAllHighLevel();
     176            0 : }
     177              : 
     178            0 : bool CheckFunVecBinaryScalarImplForMaskArray(
     179              :     VecBinaryScalarApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     180              : {
     181            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     182            0 :     check::TikcppVecBinaryScalarCheck chkIns{intriName, chkParams};
     183            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     184            0 : }
     185              : 
     186            0 : bool CheckFunVecBinaryScalarImpl(VecBinaryScalarApiParams& chkParams, const uint64_t mask, const char* intriName)
     187              : {
     188            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     189            0 :     check::TikcppVecBinaryScalarCheck chkIns{intriName, chkParams};
     190            0 :     return chkIns.CheckAllLowLevel({mask});
     191            0 : }
     192              : 
     193            0 : bool CheckFunVecBinaryScalarImpl(VecBinaryScalarApiParams& chkParams, const char* intriName)
     194              : {
     195            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     196            0 :     check::TikcppVecBinaryScalarCheck chkIns{intriName, chkParams};
     197            0 :     return chkIns.CheckAllHighLevel();
     198            0 : }
     199              : 
     200            0 : bool CheckFuncVecBinaryScalarCmpImpl(VecBinaryScalarApiParams& chkParams, const char* intriName)
     201              : {
     202            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     203            0 :     check::TikcppVecCompareScalarCheck chkIns{intriName, chkParams};
     204            0 :     return chkIns.CheckAllHighLevel();
     205            0 : }
     206              : 
     207            0 : bool CheckFuncVecBinaryScalarCmpImpl(VecBinaryScalarApiParams& chkParams, const uint64_t mask, const char* intriName)
     208              : {
     209            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     210            0 :     check::TikcppVecCompareScalarCheck chkIns{intriName, chkParams};
     211            0 :     return chkIns.CheckAllLowLevel({mask});
     212            0 : }
     213              : 
     214            0 : bool CheckFunDupImplForMaskArray(VecDupApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     215              : {
     216            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     217            0 :     check::TikcppVecDupCheck chkIns{intriName, chkParams};
     218            0 :     if (!chkIns.CheckAllLowLevel({mask[1], mask[0]})) {
     219            0 :         return false;
     220              :     }
     221            0 :     return true;
     222            0 : }
     223              : 
     224            0 : bool CheckFunDupImpl(VecDupApiParams& chkParams, const uint64_t mask, const char* intriName)
     225              : {
     226            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     227            0 :     check::TikcppVecDupCheck chkIns{intriName, chkParams};
     228            0 :     if (!chkIns.CheckAllLowLevel({mask})) {
     229            0 :         return false;
     230              :     }
     231            0 :     return true;
     232            0 : }
     233              : 
     234            0 : bool CheckFunDupImpl(VecDupApiParams& chkParams, const char* intriName)
     235              : {
     236            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     237            0 :     check::TikcppVecDupCheck chkIns{intriName, chkParams};
     238            0 :     if (!chkIns.CheckAllHighLevel()) {
     239            0 :         return false;
     240              :     }
     241            0 :     return true;
     242            0 : }
     243              : 
     244            0 : bool CheckFunBcBImpl(VecBroadCastApiParams& chkParams, uint32_t dtypeSize, const char* intriName)
     245              : {
     246            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     247            0 :     const uint64_t lowMask = FULL_MASK;
     248            0 :     const uint64_t highMask = (dtypeSize == 4) ? 0 : FULL_MASK;
     249            0 :     check::TikcppVecBroadCastCheck chkIns{intriName, chkParams};
     250            0 :     if (!chkIns.CheckAllLowLevel({highMask, lowMask})) {
     251            0 :         return false;
     252              :     }
     253            0 :     return true;
     254            0 : }
     255              : 
     256            0 : bool CheckFunReduceOtherImpl(VecReduceApiParams& chkParams, const uint64_t mask, const char* intriName)
     257              : {
     258            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     259            0 :     check::TikcppVecReduceOtherCheck chkIns{intriName, chkParams};
     260            0 :     return chkIns.CheckAllLowLevel({mask});
     261            0 : }
     262              : 
     263            0 : bool CheckFunReduceOtherImplForMaskArray(VecReduceApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     264              : {
     265            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     266            0 :     check::TikcppVecReduceOtherCheck chkIns{intriName, chkParams};
     267            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     268            0 : }
     269              : 
     270           32 : bool CheckFunReduceOtherWhlImpl(VecReduceWhlApiParams& chkParams, const uint64_t mask, const char* intriName)
     271              : {
     272           32 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     273           32 :     check::TikcppVecReduceOtherWhlCheck chkIns{intriName, chkParams};
     274           64 :     return chkIns.CheckAllLowLevel({mask});
     275           32 : }
     276              : 
     277            0 : bool CheckFunReduceOtherWhlImplForMaskArray(
     278              :     VecReduceWhlApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     279              : {
     280            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     281            0 :     check::TikcppVecReduceOtherWhlCheck chkIns{intriName, chkParams};
     282            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     283            0 : }
     284              : 
     285            0 : bool CheckFunReduceImpl(VecReduceApiParams& chkParams, const char* intriName)
     286              : {
     287            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     288            0 :     check::TikcppVecReduceCheck chkIns{intriName, chkParams};
     289            0 :     return chkIns.CheckAllHighLevel();
     290            0 : }
     291              : 
     292            0 : bool CheckFunReduceImplMode2(VecReduceApiParams& chkParams, const char* intriName)
     293              : {
     294            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     295            0 :     check::TikcppVecReduceCheck chkIns{intriName, chkParams};
     296            0 :     return chkIns.CheckAllHighLevelMode2();
     297            0 : }
     298              : 
     299            0 : bool CheckFunReduceImpl(VecReduceApiParams& chkParams, const uint64_t mask, const char* intriName)
     300              : {
     301            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     302            0 :     check::TikcppVecReduceCheck chkIns{intriName, chkParams};
     303            0 :     return chkIns.CheckAllLowLevel({mask});
     304            0 : }
     305              : 
     306            0 : bool CheckFunReduceImplForMaskArray(VecReduceApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     307              : {
     308            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     309            0 :     check::TikcppVecReduceCheck chkIns{intriName, chkParams};
     310            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     311            0 : }
     312              : 
     313            0 : bool CheckFunScatterImpl(VecScatterApiParams& chkParams, const char* intriName)
     314              : {
     315            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     316            0 :     check::TikcppVecScatterCheck chkIns{intriName, chkParams};
     317            0 :     return chkIns.CheckAllHighLevel();
     318            0 : }
     319              : 
     320            0 : bool CheckFunScatterImpl(VecScatterApiParams& chkParams, const uint64_t mask, const char* intriName)
     321              : {
     322            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     323            0 :     check::TikcppVecScatterCheck chkIns{intriName, chkParams};
     324            0 :     return chkIns.CheckAllLowLevel({mask});
     325            0 : }
     326              : 
     327            0 : bool CheckFunScatterImplForMaskArray(VecScatterApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     328              : {
     329            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     330            0 :     check::TikcppVecScatterCheck chkIns{intriName, chkParams};
     331            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     332            0 : }
     333              : 
     334            0 : bool CheckFuncGatherbImpl(VecGatherApiParams& chkParams, uint32_t dtypeSize, const char* intriName)
     335              : {
     336            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     337            0 :     const uint64_t lowMask = (dtypeSize == 8) ? 0xffffffff : FULL_MASK;
     338            0 :     const uint64_t highMask = (dtypeSize >= 4) ? 0 : FULL_MASK;
     339            0 :     check::TikcppVecGatherbCheck chkIns{intriName, chkParams};
     340            0 :     return chkIns.CheckAllLowLevel({highMask, lowMask});
     341            0 : }
     342              : 
     343            0 : bool CheckFuncGatherImpl(VecGatherApiParams& chkParams, const uint64_t mask, const char* intriName)
     344              : {
     345            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     346            0 :     check::TikcppVecGatherCheck chkIns{intriName, chkParams};
     347            0 :     return chkIns.CheckAllLowLevel({mask});
     348            0 : }
     349              : 
     350            0 : bool CheckFuncGatherImpl(VecGatherApiParams& chkParams, const uint64_t mask[], const char* intriName)
     351              : {
     352            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     353            0 :     check::TikcppVecGatherCheck chkIns{intriName, chkParams};
     354            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     355            0 : }
     356              : 
     357            0 : bool CheckFuncGatherImpl(VecGatherApiParams& chkParams, const char* intriName)
     358              : {
     359            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     360            0 :     check::TikcppVecGatherCheck chkIns{intriName, chkParams};
     361            0 :     return chkIns.CheckAllHighLevel();
     362            0 : }
     363              : 
     364            0 : bool CheckFuncCreateVecIndexImpl(VecCreateVecIndexApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     365              : {
     366            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     367            0 :     check::TikcppVecCreateVecIndexCheck chkIns{intriName, chkParams};
     368            0 :     return chkIns.CheckAllLowLevel({mask[1], mask[0]});
     369            0 : }
     370              : 
     371            0 : bool CheckFuncCreateVecIndexImpl(VecCreateVecIndexApiParams& chkParams, const uint64_t mask, const char* intriName)
     372              : {
     373            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     374            0 :     check::TikcppVecCreateVecIndexCheck chkIns{intriName, chkParams};
     375            0 :     return chkIns.CheckAllLowLevel({mask});
     376            0 : }
     377              : 
     378            0 : bool CheckFuncCreateVecIndexImpl(VecCreateVecIndexApiParams& chkParams, const char* intriName)
     379              : {
     380            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     381            0 :     check::TikcppVecCreateVecIndexCheck chkIns{intriName, chkParams};
     382            0 :     return chkIns.CheckAllHighLevel();
     383            0 : }
     384              : 
     385            0 : bool CheckFuncBilinearInterpolationImpl(
     386              :     VecBilinearInterpolationApiParams& chkParams, const uint64_t mask, const char* intriName)
     387              : {
     388            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     389            0 :     check::TikcppVecBilinearInterpolationCheck chkIns{intriName, chkParams};
     390            0 :     if (!chkIns.CheckAllLowLevel({mask})) {
     391            0 :         return false;
     392              :     }
     393            0 :     return true;
     394            0 : }
     395              : 
     396            0 : bool CheckFuncBilinearInterpolationImpl(
     397              :     VecBilinearInterpolationApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     398              : {
     399            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     400            0 :     check::TikcppVecBilinearInterpolationCheck chkIns{intriName, chkParams};
     401            0 :     if (!chkIns.CheckAllLowLevel({mask[1], mask[0]})) {
     402            0 :         return false;
     403              :     }
     404            0 :     return true;
     405            0 : }
     406              : 
     407            0 : bool CheckFuncInitConstValueImpl(CubeInitConstValueApiParams& chkParams, const char* intriName)
     408              : {
     409            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     410            0 :     check::TikcppCubeInitConstValueCheck chkIns{intriName, chkParams};
     411            0 :     if (!chkIns.CheckAllLowLevel()) {
     412            0 :         return false;
     413              :     }
     414            0 :     return true;
     415            0 : }
     416              : 
     417            0 : bool CheckFunTransposeImpl(VecTransposeApiParams& chkParams, const char* intriName)
     418              : {
     419            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     420            0 :     check::TikcppVecTransposeCheck chkIns{intriName, chkParams};
     421            0 :     if (!chkIns.CheckAllLowLevel()) {
     422            0 :         return false;
     423              :     }
     424            0 :     return true;
     425            0 : }
     426              : 
     427            0 : bool CheckFunProposalImpl(VecProposalApiParams& chkParams, const char* intriName)
     428              : {
     429            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     430            0 :     check::TikcppVecProposalCheck chkIns{intriName, chkParams};
     431            0 :     if (!chkIns.CheckAllHighLevel()) {
     432            0 :         return false;
     433              :     }
     434            0 :     return true;
     435            0 : }
     436              : 
     437            0 : bool CheckSortImpl(SortApiParams& chkParams, const char* intriName)
     438              : {
     439            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     440            0 :     check::TikcppVecSortCheck chkIns{intriName, chkParams};
     441            0 :     return chkIns.CheckAllHighLevel();
     442            0 : }
     443              : 
     444            0 : bool CheckFuncLoadData2dImpl(LoadData2dApiParams& chkParams, const char* intriName)
     445              : {
     446            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     447            0 :     check::TikcppLoaddata2dCheck chkIns{intriName, chkParams};
     448            0 :     if (!chkIns.CheckAllHighLevel()) {
     449            0 :         return false;
     450              :     }
     451            0 :     return true;
     452            0 : }
     453              : 
     454            0 : bool CheckFuncLoadData2dv2Impl(LoadData2dv2ApiParams& chkParams, const char* intriName)
     455              : {
     456            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     457            0 :     check::TikcppLoaddata2dv2Check chkIns{intriName, chkParams};
     458            0 :     if (!chkIns.CheckAllHighLevel()) {
     459            0 :         return false;
     460              :     }
     461            0 :     return true;
     462            0 : }
     463              : 
     464            0 : bool CheckFuncLoadData3dv1Impl(LoadData3dv1ApiParams& chkParams, const char* intriName)
     465              : {
     466            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     467            0 :     check::TikcppLoaddata3dv1Check chkIns{intriName, chkParams};
     468            0 :     if (!chkIns.CheckAllHighLevel()) {
     469            0 :         return false;
     470              :     }
     471            0 :     return true;
     472            0 : }
     473              : 
     474            0 : bool CheckFuncLoadData3dv2Impl(LoadData3dv2ApiParams& chkParams, const char* intriName)
     475              : {
     476            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     477            0 :     check::TikcppLoaddata3dv2Check chkIns{intriName, chkParams};
     478            0 :     if (!chkIns.CheckAllHighLevel()) {
     479            0 :         return false;
     480              :     }
     481            0 :     return true;
     482            0 : }
     483              : 
     484            0 : bool CheckFuncLoadData3dv2ProImpl(LoadData3dv2ProApiParams& chkParams, const char* intriName)
     485              : {
     486            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     487            0 :     check::TikcppLoaddata3dv2ProCheck chkIns{intriName, chkParams};
     488            0 :     if (!chkIns.CheckAllHighLevel()) {
     489            0 :         return false;
     490              :     }
     491            0 :     return true;
     492            0 : }
     493              : 
     494            0 : bool CheckFuncLoadImageToLocalImpl(LoadImageToLocalApiParams& chkParams, const char* intriName)
     495              : {
     496            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     497            0 :     check::TikcppLoadImageToLocalCheck chkIns{intriName, chkParams};
     498            0 :     if (!chkIns.CheckAllHighLevel()) {
     499            0 :         return false;
     500              :     }
     501            0 :     return true;
     502            0 : }
     503              : 
     504           20 : bool CheckFuncBroadCastToMMImpl(VecBroadCastToMMApiParams& chkParams, const char* intriName)
     505              : {
     506           20 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     507           20 :     check::TikcppBroadCastToMMCheck chkIns{intriName, chkParams};
     508           20 :     if (!chkIns.CheckAllHighLevel()) {
     509            8 :         return false;
     510              :     }
     511           12 :     return true;
     512           20 : }
     513              : 
     514            0 : bool CheckFuncVecGatherMaskImpl(VecGatherMaskApiParams& chkParams, const uint32_t mask, const char* intriName)
     515              : {
     516            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     517            0 :     check::TikcppGatherMaskCheck chkIns{intriName, chkParams};
     518            0 :     if (!chkIns.CheckAllLowLevel({0, mask})) {
     519            0 :         return false;
     520              :     }
     521            0 :     return true;
     522            0 : }
     523              : 
     524            0 : bool CheckVectorPaddingForMaskArray(VectorPaddingApiParams& chkParams, const uint64_t mask[2], const char* intriName)
     525              : {
     526            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     527            0 :     check::TikcppVectorPaddingCheck chkIns{intriName, chkParams};
     528            0 :     if (!chkIns.CheckAllLowLevel({mask[1], mask[0]})) {
     529            0 :         return false;
     530              :     }
     531            0 :     return true;
     532            0 : }
     533              : 
     534            0 : bool CheckVectorPadding(VectorPaddingApiParams& chkParams, const uint64_t mask, const char* intriName)
     535              : {
     536            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     537            0 :     check::TikcppVectorPaddingCheck chkIns{intriName, chkParams};
     538            0 :     if (!chkIns.CheckAllLowLevel({mask})) {
     539            0 :         return false;
     540              :     }
     541            0 :     return true;
     542            0 : }
     543              : 
     544            0 : bool CheckVectorPadding(VectorPaddingApiParams& chkParams, const char* intriName)
     545              : {
     546            0 :     ASCENDC_CHECK_INTRI_NAME(intriName);
     547            0 :     check::TikcppVectorPaddingCheck chkIns{intriName, chkParams};
     548            0 :     if (!chkIns.CheckAllHighLevel()) {
     549            0 :         return false;
     550              :     }
     551            0 :     return true;
     552            0 : }
     553              : 
     554            4 : uint64_t GetHardWarebufferSize(uint8_t index) { return check::GlobalParams::Instance().bufferSizeMap.at(index); }
     555              : 
     556              : } // namespace check
     557              : } // namespace AscendC
        

Generated by: LCOV version 2.0-1