2019-04-17 10:49:11 +08:00
|
|
|
//
|
|
|
|
// CPUTopKV2.hpp
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2018/08/28.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CPUTOPKV2_HPP
|
|
|
|
#define CPUTOPKV2_HPP
|
|
|
|
|
2019-12-27 22:16:57 +08:00
|
|
|
#include "core/Execution.hpp"
|
2019-04-17 10:49:11 +08:00
|
|
|
#include "MNN_generated.h"
|
|
|
|
|
|
|
|
namespace MNN {
|
|
|
|
class CPUTopKV2 : public Execution {
|
|
|
|
public:
|
2021-12-10 15:16:28 +08:00
|
|
|
CPUTopKV2(Backend *b, const Op* op);
|
2019-04-17 10:49:11 +08:00
|
|
|
virtual ~CPUTopKV2() = default;
|
|
|
|
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
|
|
|
|
|
|
|
|
private:
|
2022-01-04 10:50:40 +08:00
|
|
|
bool mLargest = true;
|
2019-04-17 10:49:11 +08:00
|
|
|
};
|
|
|
|
} // namespace MNN
|
|
|
|
|
|
|
|
#endif // CPUTOPKV2_HPP
|