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

38 lines
1.2 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;
2021-04-08 15:34:23 +08:00
virtual bool onClone(Backend* bn, const Op* op, Execution** dst) override;
2019-04-17 10:49:11 +08:00
private:
2021-04-08 15:34:23 +08:00
ConvolutionDepthwise3x3(std::shared_ptr<Resource> resource, const Convolution2DCommon* common, Backend* b);
std::shared_ptr<Resource> mResource;
2019-04-17 10:49:11 +08:00
std::unique_ptr<Tensor> mCacheLine;
int mSourceStartX = 0;
int mSourceEndX = 0;
2021-04-08 15:34:23 +08:00
std::vector<float> mPostParameters;
2024-07-22 19:51:53 +08:00
std::vector<int> mDivides;
2019-04-17 10:49:11 +08:00
};
} // namespace MNN
#endif /* ConvolutionDepthwise3x3_hpp */