1 | /******************************************************************************* |
2 | * Copyright 2020 Intel Corporation |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. |
6 | * You may obtain a copy of the License at |
7 | * |
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | * |
10 | * Unless required by applicable law or agreed to in writing, software |
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. |
15 | *******************************************************************************/ |
16 | |
17 | #ifndef GPU_GPU_ZERO_PAD_PD_HPP |
18 | #define GPU_GPU_ZERO_PAD_PD_HPP |
19 | |
20 | #include "common/primitive_desc.hpp" |
21 | |
22 | namespace dnnl { |
23 | namespace impl { |
24 | namespace gpu { |
25 | |
26 | struct gpu_zero_pad_pd_t : public primitive_desc_t { |
27 | static constexpr auto base_pkind = primitive_kind::zero_pad; |
28 | typedef gpu_zero_pad_pd_t hint_class; |
29 | |
30 | gpu_zero_pad_pd_t(const zero_pad_desc_t *adesc, |
31 | const primitive_attr_t *attr, const hint_class *hint_fwd_pd) |
32 | : primitive_desc_t(base_pkind), desc_(*adesc) {} |
33 | |
34 | const zero_pad_desc_t *desc() const { return &desc_; } |
35 | const op_desc_t *op_desc() const override { |
36 | return reinterpret_cast<const op_desc_t *>(this->desc()); |
37 | } |
38 | |
39 | private: |
40 | zero_pad_desc_t desc_; |
41 | }; |
42 | |
43 | } // namespace gpu |
44 | } // namespace impl |
45 | } // namespace dnnl |
46 | |
47 | #endif |
48 | |