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_vec_proposal_check.h
13 : * \brief
14 : */
15 :
16 : #ifndef ASCENDC_VEC_PROPOSAL_CHECK_H
17 : #define ASCENDC_VEC_PROPOSAL_CHECK_H
18 : #include "kernel_base_check.h"
19 :
20 : namespace AscendC {
21 : namespace check {
22 : class TikcppVecProposalCheck : public TikcppBaseCheck {
23 : public:
24 80 : TikcppVecProposalCheck(const std::string& name, VecProposalApiParams& param) : TikcppBaseCheck(name), param_(param)
25 80 : {}
26 80 : ~TikcppVecProposalCheck() override = default;
27 :
28 : bool CheckAllHighLevel();
29 : bool CheckAddrAlign(const std::string& src0Name);
30 : bool NeedRepeatTimes() const;
31 : bool Vbs16Check() const;
32 : bool Vbs32Check() const;
33 : bool Vms4Check() const;
34 : bool Vms4v2Check() const;
35 : bool VconcatCheck() const;
36 : bool VextractCheck() const;
37 : bool ConcatCheck() const;
38 : bool ExtractCheck() const;
39 :
40 : uint8_t CountBit(uint16_t validBit) const;
41 : bool CheckValidBit(uint16_t validBit) const;
42 : uint64_t CalSortElemPerRep(uint16_t elementLengths[4], uint8_t count) const;
43 :
44 : public:
45 : VecProposalApiParams& param_;
46 : };
47 : } // namespace check
48 : } // namespace AscendC
49 : #endif
|