1 //
2 //  MetalCast.hpp
3 //  MNN
4 //
5 //  Created by MNN on 2019/01/30.
6 //  Copyright © 2018, Alibaba Group Holding Limited
7 //
8 
9 #ifndef MetalCast_hpp
10 #define MetalCast_hpp
11 
12 #import "core/Execution.hpp"
13 #import "MetalDefine.h"
14 #import "Type_generated.h"
15 
16 #if MNN_METAL_ENABLED
17 namespace MNN {
18 
19 class MetalCast : public Execution {
20 public:
21     MetalCast(Backend *backend, DataType srcType, DataType dstType);
22     virtual ~MetalCast() = default;
23     virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
24 
25 private:
26     DataType mSrcType;
27     DataType mDstType;
28 };
29 
30 } // namespace MNN
31 #endif /* MNN_METAL_ENABLED */
32 
33 #endif /* MetalCast_hpp */
34