Elffuss BraidHub

kikocis/ncnn public

master · 1.1 KiBRawPermalink
1// Xavier Hsinyuan is pleased to support the open source community by making
2// ncnn available.
3//
4// Copyright (C) 2021 Xavier Hsinyuan <me@lstlx.com>. All rights reserved.
5//
6// Licensed under the BSD 3-Clause License (the "License"); you may not use this
7// file except in compliance with the License. You may obtain a copy of the
8// License at
9//
10// https://opensource.org/licenses/BSD-3-Clause
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15// License for the specific language governing permissions and limitations under
16// the License.
17
18#ifndef LAYER_HARDSWISH_RISCV_H
19#define LAYER_HARDSWISH_RISCV_H
20
21#include "hardswish.h"
22
23namespace ncnn {
24
25class HardSwish_riscv : public HardSwish
26{
27public:
28 HardSwish_riscv();
29
30 virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const;
31
32protected:
33#if __riscv_vector && __riscv_zfh
34 int forward_inplace_fp16s(Mat& bottom_top_blob, const Option& opt) const;
35#endif
36};
37
38} // namespace ncnn
39
40#endif // LAYER_HARDSWISH_RISCV_H