/** * \file dnn/src/arm_common/elemwise_helper/kimpl/pow.h * MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * * Copyright (c) 2014-2020 Megvii Inc. All rights reserved. * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */#pragma once#include "src/arm_common/elemwise_helper/kimpl/op_base.h"namespacemegdnn{namespacearm_common{// when __fp16 is avaliable POW is very slow, so add there/////////////////////// POW float only ////////////////////////////template<typenamesrc_ctype,typenamedst_ctype=src_ctype>structPowOp:BinaryOpBase<src_ctype,dst_ctype>{usingBinaryOpBase<src_ctype,dst_ctype>::BinaryOpBase;constexprstaticsize_tSIMD_WIDTH=1;voidoperator()(constsrc_ctype&src0,constsrc_ctype&src1,dst_ctype*dst)const{*dst=operator()(src0,src1);}dst_ctypeoperator()(constsrc_ctype&src0,constsrc_ctype&src1)const{returnpowf(src0,src1);}};}// namespace arm_common}// namespace megdnn// vim: syntax=cpp.doxygen