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.
5 #ifndef OPENCV_DNN_SRC_CUDA4DNN_KERNELS_SCALE_HPP
6 #define OPENCV_DNN_SRC_CUDA4DNN_KERNELS_SCALE_HPP
8 #include "../csl/stream.hpp"
9 #include "../csl/tensor.hpp"
13 namespace cv { namespace dnn { namespace cuda4dnn { namespace kernels {
16 void bias1(const csl::Stream& stream, csl::TensorSpan<T> output, csl::TensorView<T> input, T alpha);
19 void biasN(const csl::Stream& stream,
20 csl::TensorSpan<T> output,
21 csl::TensorView<T> input, std::size_t inner_size,
22 csl::TensorView<T> bias);
25 void scale1(const csl::Stream& stream, csl::TensorSpan<T> output, csl::TensorView<T> input, T alpha);
28 void scaleN(const csl::Stream& stream,
29 csl::TensorSpan<T> output,
30 csl::TensorView<T> input, std::size_t inner_size,
31 csl::TensorView<T> weights);
34 void scale1_with_bias1(const csl::Stream& stream, csl::Span<T> output, csl::View<T> input, T alpha, T beta);
37 void scaleN_with_biasN(
38 const csl::Stream& stream,
39 csl::TensorSpan<T> output,
40 csl::TensorView<T> input, std::size_t inner_size,
41 csl::TensorView<T> weights, csl::TensorView<T> bias);
43 }}}} /* namespace cv::dnn::cuda4dnn::kernels */
45 #endif /* OPENCV_DNN_SRC_CUDA4DNN_KERNELS_SCALE_HPP */