// // MetalMatMul.hpp // MNN // // Created by MNN on 2019/01/30. // Copyright © 2018, Alibaba Group Holding Limited // #ifndef MetalMatMul_hpp #define MetalMatMul_hpp #import "MetalExecution.hpp" #import "MNN_generated.h" #import "MetalBackend.hpp" #if MNN_METAL_ENABLED namespace MNN { class MetalMatMul : public MetalExecution { public: MetalMatMul(Backend *backend, const MatMul *matmul, bool withBias); virtual ~MetalMatMul(); virtual void onEncode(const std::vector &inputs, const std::vector &outputs, id encoder) override; virtual ErrorCode onResize(const std::vector &inputs, const std::vector &outputs) override; private: id mConstBuffer = nil; bool mTransposeA = false; bool mTransposeB = false; id mPipeline; std::pair mThreads; }; } // namespace MNN #endif /* MNN_METAL_ENABLED */ #endif /* MetalMatMul_hpp */