/**
 * Copyright (c) 2026 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.
 */

/* Generated By CANNBot */

/*!
 * \file cosh_apt.cpp
 * \brief Cosh 算子 kernel 入口(标准 Ascend C kernel,arch35 / Ascend950PR,DESIGN §3.4)
 *
 * 模板参数(与 arch35/cosh_tiling_key.h 中 ASCENDC_TPL_ARGS_DECL 定义对应):
 *   - D_T_X: 输入/输出数据类型,由 ASCENDC_TPL_DATATYPE_DECL(D_T_X, ...) 定义,
 *            Host 侧 ASCENDC_TPL_SEL_PARAM(context, dtype) 映射到此模板参数。
 *
 * KernelCosh<D_T_X> 内部用 if constexpr 区分 WithCast(fp16/bf16)与 WithoutCast(fp32)路径。
 */

#include "arch35/cosh.h"

template <typename D_T_X>
__global__ __aicore__ void cosh(GM_ADDR x, GM_ADDR y, GM_ADDR workspace, GM_ADDR tiling)
{
    KERNEL_TASK_TYPE_DEFAULT(KERNEL_TYPE_AIV_ONLY);
    REGISTER_TILING_DEFAULT(CoshTilingData);
    GET_TILING_DATA_WITH_STRUCT(CoshTilingData, tilingData, tiling);
    NsCosh::KernelCosh<D_T_X> op;
    op.Init(x, y, &tilingData);
    op.Process();
}