2020-03-08 10:20:18 +08:00
|
|
|
#ifndef OpCommonUtils_hpp
|
|
|
|
#define OpCommonUtils_hpp
|
|
|
|
#include <MNN/Tensor.hpp>
|
|
|
|
namespace MNN {
|
2020-03-09 18:02:01 +08:00
|
|
|
struct Op;
|
2020-03-08 10:20:18 +08:00
|
|
|
class MNN_PUBLIC OpCommonUtils {
|
|
|
|
public:
|
|
|
|
static void broastCastComputeDim(int* dims, int* stride, int* iStride0, int* iStride1, const Tensor* input0, const Tensor* input1, const Tensor* output);
|
2020-03-09 18:02:01 +08:00
|
|
|
static std::vector<std::tuple<int, int, int>> computeReduceDims(const std::vector<Tensor*>& inputs, const Op* op);
|
2020-03-08 10:20:18 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|