Path: blob/master/modules/dnn/src/vkcom/include/op_concat.hpp
16354 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html.3//4// Copyright (C) 2018, Intel Corporation, all rights reserved.5// Third party copyrights are property of their respective owners.67#ifndef OPENCV_DNN_VKCOM_OP_CONCAT_HPP8#define OPENCV_DNN_VKCOM_OP_CONCAT_HPP910#include "vkcom.hpp"11#include "op_base.hpp"1213namespace cv { namespace dnn { namespace vkcom {1415#ifdef HAVE_VULKAN1617struct ConcatShaderConfig18{19int local_size_x;20int local_size_y;21int local_size_z;22int block_height;23int block_width;24int block_depth;25};2627class OpConcat: public OpBase28{29public:30OpConcat(const int axis);31bool forward(std::vector<Tensor>& ins, Tensor& out);32void reshapeOutTensor(std::vector<Tensor *>& in, Tensor& out);33virtual bool forward(std::vector<Tensor>& ins,34std::vector<Tensor>& blobs,35std::vector<Tensor>& outs) CV_OVERRIDE;3637private:38bool init(const int axis);39bool computeGroupCount();4041ConcatShaderConfig config_;42int axis_;43int out_concat_axis_;44int accumulated_concat_axis_;45int concat_size_;46int total_concat_size_;47int thread_num_;48};4950#endif // HAVE_VULKAN5152}}} // namespace cv::dnn::vkcom5354#endif // OPENCV_DNN_VKCOM_OP_CONCAT_HPP555657