| 26 | namespace cl { |
| 27 | |
| 28 | class Upsample : public GPUOperation { |
| 29 | public: |
| 30 | Status AddToQueue(CLCommandQueue* queue) override; |
| 31 | Status Tune(const TuningParameters& params) override; |
| 32 | |
| 33 | Status Compile(const CreationContext& creation_context) override; |
| 34 | |
| 35 | // Move only |
| 36 | Upsample(Upsample&& operation); |
| 37 | Upsample& operator=(Upsample&& operation); |
| 38 | Upsample(const Upsample&) = delete; |
| 39 | Upsample& operator=(const Upsample&) = delete; |
| 40 | |
| 41 | friend Upsample CreateUpsample(const OperationDef& definition, |
| 42 | const Upsample2DAttributes& attr); |
| 43 | |
| 44 | private: |
| 45 | Upsample(const OperationDef& definition, const Upsample2DAttributes& attr) |
| 46 | : GPUOperation(definition), attr_(attr) {} |
| 47 | |
| 48 | Status BindArguments(); |
| 49 | int3 GetGridSize() const; |
| 50 | |
| 51 | Upsample2DAttributes attr_; |
| 52 | CLKernel kernel_; |
| 53 | int3 work_group_size_ = int3(8, 4, 1); |
| 54 | }; |
| 55 | |
| 56 | Upsample CreateUpsample(const OperationDef& definition, |
| 57 | const Upsample2DAttributes& attr); |