* Copyright (c) 2025 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
* \file add_example.h
* \brief
*/
#ifndef __ADD_EXAMPLE_H__
#define __ADD_EXAMPLE_H__
#include "kernel_operator.h"
#include "kernel_tiling/kernel_tiling.h"
#include "add_example_tiling_data.h"
#include "add_example_tiling_key.h"
namespace NsAddExample {
using namespace AscendC;
constexpr int32_t BUFFER_NUM = 2;
template <typename T>
class AddExample {
public:
__aicore__ inline AddExample(){};
__aicore__ inline void Init(GM_ADDR x, GM_ADDR y, const AddExampleTilingData* tilingData);
__aicore__ inline void Process();
private:
__aicore__ inline void CopyIn();
__aicore__ inline void CopyOut();
__aicore__ inline void Compute();
private:
TPipe pipe;
TQue<QuePosition::VECIN, BUFFER_NUM> XXX;
TQue<QuePosition::VECOUT, BUFFER_NUM> YYY;
};
template <typename T>
__aicore__ inline void AddExample<T>::Init(GM_ADDR x, GM_ADDR y, const AddExampleTilingData* tilingData)
{
}
template <typename T>
__aicore__ inline void AddExample<T>::CopyIn()
{
}
template <typename T>
__aicore__ inline void AddExample<T>::CopyOut()
{
}
template <typename T>
__aicore__ inline void AddExample<T>::Compute()
{
}
template <typename T>
__aicore__ inline void AddExample<T>::Process()
{
int32_t loopExample = 5;
for (int32_t i = 0; i < loopExample; i++) {
CopyIn();
Compute();
CopyOut();
}
}
}
#endif