MNN/source/backend/cpu/compute/ConvolutionDepthwise3x3.hpp

35 lines
1.0 KiB
C++
Raw Normal View History

2019-04-17 10:49:11 +08:00
//
// ConvolutionDepthwise3x3.hpp
// MNN
//
// Created by MNN on 2019/4/3.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef ConvolutionDepthwise3x3_hpp
#define ConvolutionDepthwise3x3_hpp
2019-12-27 22:16:57 +08:00
#include "backend/cpu/CPUConvolution.hpp"
2019-04-17 10:49:11 +08:00
namespace MNN {
class ConvolutionDepthwise3x3 : public CPUConvolution {
public:
ConvolutionDepthwise3x3(const Convolution2DCommon *common, Backend *b, const float *originWeight,
size_t originWeightSize, const float *bias, size_t biasSize);
virtual ~ConvolutionDepthwise3x3();
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
private:
std::unique_ptr<Tensor> mWeight;
std::unique_ptr<Tensor> mBias;
std::unique_ptr<Tensor> mCacheLine;
int mSourceStartX = 0;
int mSourceEndX = 0;
};
} // namespace MNN
#endif /* ConvolutionDepthwise3x3_hpp */