conv_arm_func.h 1.6 KB
Newer Older
L
liuruilong 已提交
1
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
L
liuruilong 已提交
2

L
liuruilong 已提交
3 4 5
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
L
liuruilong 已提交
6

L
liuruilong 已提交
7 8 9 10 11 12 13 14 15 16 17
    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#ifdef CONV_OP

#pragma once
H
update  
hjchen2 已提交
18

19
#include <vector>
L
liuruilong 已提交
20 21 22 23
#include "operators/op_param.h"

namespace paddle_mobile {
namespace operators {
24

H
update  
hjchen2 已提交
25 26
int ConvOutputSize(int input_size, int filter_size, int dilation, int padding,
                   int stride);
L
liuruilong 已提交
27

H
update  
hjchen2 已提交
28 29 30
bool IsExpand(const std::vector<int64_t> &filter_dim,
              const std::vector<int> &strides, const std::vector<int> &paddings,
              const std::vector<int> &dilations);
H
hjchen2 已提交
31

H
update  
hjchen2 已提交
32 33
template <typename Itype, typename Otype>
void GemmConv(const ConvParam<CPU> &param);
L
liuruilong 已提交
34

H
hjchen2 已提交
35
template <int tile, int kernel>
H
update  
hjchen2 已提交
36
void WinogradConv3x3(const ConvParam<CPU> &param);
H
hjchen2 已提交
37

H
hjchen2 已提交
38
template <typename Itype, typename Otype>
H
update  
hjchen2 已提交
39
void DepthwiseConv3x3(const ConvParam<CPU> &param);
40 41

template <typename Itype, typename Otype>
H
update  
hjchen2 已提交
42
void DepthwiseConv5x5(const ConvParam<CPU> &param);
H
backup  
hjchen2 已提交
43

S
StarryRain 已提交
44 45 46
template <typename Itype, typename Otype>
void SlidingwindowConv3x3(const ConvParam<CPU> &param);

47 48 49
void FasterDepthwiseConv3x3_bias_relu(const ConvParam<CPU> &param,
                                      const float *bias, bool flag_relu);

L
liuruilong 已提交
50 51
}  // namespace operators
}  // namespace paddle_mobile
L
liuruilong 已提交
52 53

#endif