MNN/source/backend/cpu/CPUUnary.hpp

29 lines
766 B
C++
Raw Normal View History

2019-04-17 10:49:11 +08:00
//
// CPUUnary.hpp
// MNN
//
// Created by MNN on 2018/08/02.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef CPUUnary_hpp
#define CPUUnary_hpp
2019-12-27 22:16:57 +08:00
#include "core/Execution.hpp"
#include "compute/CommonOptFunction.h"
2019-04-17 10:49:11 +08:00
namespace MNN {
class CPUUnary : public Execution {
public:
CPUUnary(Backend *b, MNNUnaryExecute proc);
2019-04-17 10:49:11 +08:00
virtual ~CPUUnary() = default;
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;
static MNNUnaryExecute selectForFloat(int type, int precision);
2019-04-17 10:49:11 +08:00
protected:
MNNUnaryExecute mProc;
2019-04-17 10:49:11 +08:00
};
} // namespace MNN
#endif /* CPUUnary_hpp */