2019-04-17 10:49:11 +08:00
|
|
|
//
|
|
|
|
// CPUConcat.hpp
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2018/07/06.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CPUConcat_hpp
|
|
|
|
#define CPUConcat_hpp
|
|
|
|
|
2019-12-27 22:16:57 +08:00
|
|
|
#include "core/Execution.hpp"
|
2019-04-17 10:49:11 +08:00
|
|
|
|
|
|
|
namespace MNN {
|
|
|
|
class CPUConcat : public Execution {
|
|
|
|
public:
|
2019-06-24 11:32:41 +08:00
|
|
|
CPUConcat(Backend *b, int axis) : Execution(b), mAxis(axis) {
|
|
|
|
// Do nothing
|
2019-04-17 10:49:11 +08:00
|
|
|
}
|
|
|
|
virtual ~CPUConcat() = default;
|
|
|
|
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
|
|
|
|
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
|
|
|
|
|
|
|
|
private:
|
2019-06-24 11:32:41 +08:00
|
|
|
int mAxis = 1;
|
2019-04-17 10:49:11 +08:00
|
|
|
std::shared_ptr<Tensor> mTempOutput;
|
|
|
|
bool mUseSlowMethod = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace MNN
|
|
|
|
|
|
|
|
#endif /* CPUConcat_hpp */
|