Merge pull request #14827 from YashasSamaga:cuda4dnn-csl-low
[platform/upstream/opencv.git] / modules / dnn / src / cuda4dnn / kernels / max_unpooling.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
4
5 #ifndef OPENCV_DNN_SRC_CUDA4DNN_KERNELS_MAX_UNPOOLING_HPP
6 #define OPENCV_DNN_SRC_CUDA4DNN_KERNELS_MAX_UNPOOLING_HPP
7
8 #include "../csl/stream.hpp"
9 #include "../csl/tensor.hpp"
10
11 #include <cstddef>
12 #include <vector>
13
14 namespace cv { namespace dnn { namespace cuda4dnn { namespace kernels {
15
16     template <class T>
17     void max_pooling_with_indices(
18         const csl::Stream& stream,
19         csl::TensorSpan<T> output, csl::TensorSpan<T> indices, csl::TensorView<T> input,
20         const std::vector<std::size_t>& kernel_size, const std::vector<std::size_t>& strides,
21         const std::vector<std::size_t>& padding_left);
22
23     template <class T>
24     void max_unpooling(
25         const csl::Stream& stream,
26         csl::TensorSpan<T> output, csl::TensorView<T> input, csl::TensorView<T> indices,
27         const std::vector<std::size_t>& window_size, const std::vector<std::size_t>& strides,
28         const std::vector<std::size_t>& padding_left);
29
30 }}}} /* namespace cv::dnn::cuda4dnn::kernels */
31
32 #endif /* OPENCV_DNN_SRC_CUDA4DNN_KERNELS_MAX_UNPOOLING_HPP */