| 173 | } |
| 174 | template <typename ctype> |
| 175 | void ResizeImpl::kern_naive(const KernParam<ctype>& kern_param) { |
| 176 | if (kern_param.format == Format::NHWC) { |
| 177 | MIDOUT_BEGIN(megdnn_naive_resize_layout, midout_iv(0)) { |
| 178 | kern_naive_nhwc(kern_param); |
| 179 | } |
| 180 | MIDOUT_END(); |
| 181 | return; |
| 182 | } else if (kern_param.format == Format::NHWCD4) { |
| 183 | MIDOUT_BEGIN(megdnn_naive_resize_layout, midout_iv(1)) { |
| 184 | kern_naive_nhwcd4(kern_param); |
| 185 | } |
| 186 | MIDOUT_END(); |
| 187 | return; |
| 188 | } else if (kern_param.format == Format::NCHW4) { |
| 189 | MIDOUT_BEGIN(megdnn_naive_resize_layout, midout_iv(2)) { |
| 190 | kern_naive_nchwx<ctype, 4>(kern_param); |
| 191 | } |
| 192 | MIDOUT_END(); |
| 193 | return; |
| 194 | } else if (kern_param.format == Format::NCHW44) { |
| 195 | MIDOUT_BEGIN(megdnn_naive_resize_layout, midout_iv(3)) { |
| 196 | kern_naive_nchwx<ctype, 4>(kern_param); |
| 197 | } |
| 198 | MIDOUT_END(); |
| 199 | return; |
| 200 | } else if (kern_param.format == Format::NCHW88) { |
| 201 | MIDOUT_BEGIN(megdnn_naive_resize_layout, midout_iv(4)) { |
| 202 | kern_naive_nchwx<ctype, 8>(kern_param); |
| 203 | } |
| 204 | MIDOUT_END(); |
| 205 | return; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | template <typename ctype> |
| 210 | void ResizeImpl::kern_naive_nhwc(const KernParam<ctype>& kern_param) { |
nothing calls this directly
no test coverage detected