copy.hpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. /*M///////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
  4. //
  5. // By downloading, copying, installing or using the software you agree to this license.
  6. // If you do not agree to this license, do not download, install,
  7. // copy or use the software.
  8. //
  9. //
  10. // License Agreement
  11. // For Open Source Computer Vision Library
  12. //
  13. // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
  14. // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
  15. // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
  16. // Third party copyrights are property of their respective owners.
  17. //
  18. // Redistribution and use in source and binary forms, with or without modification,
  19. // are permitted provided that the following conditions are met:
  20. //
  21. // * Redistribution's of source code must retain the above copyright notice,
  22. // this list of conditions and the following disclaimer.
  23. //
  24. // * Redistribution's in binary form must reproduce the above copyright notice,
  25. // this list of conditions and the following disclaimer in the documentation
  26. // and/or other materials provided with the distribution.
  27. //
  28. // * The name of the copyright holders may not be used to endorse or promote products
  29. // derived from this software without specific prior written permission.
  30. //
  31. // This software is provided by the copyright holders and contributors "as is" and
  32. // any express or implied warranties, including, but not limited to, the implied
  33. // warranties of merchantability and fitness for a particular purpose are disclaimed.
  34. // In no event shall the Intel Corporation or contributors be liable for any direct,
  35. // indirect, incidental, special, exemplary, or consequential damages
  36. // (including, but not limited to, procurement of substitute goods or services;
  37. // loss of use, data, or profits; or business interruption) however caused
  38. // and on any theory of liability, whether in contract, strict liability,
  39. // or tort (including negligence or otherwise) arising in any way out of
  40. // the use of this software, even if advised of the possibility of such damage.
  41. //
  42. //M*/
  43. #pragma once
  44. #ifndef OPENCV_CUDEV_GRID_COPY_HPP
  45. #define OPENCV_CUDEV_GRID_COPY_HPP
  46. #include "../common.hpp"
  47. #include "../util/tuple.hpp"
  48. #include "../ptr2d/traits.hpp"
  49. #include "../ptr2d/gpumat.hpp"
  50. #include "../ptr2d/glob.hpp"
  51. #include "../ptr2d/mask.hpp"
  52. #include "../ptr2d/zip.hpp"
  53. #include "detail/copy.hpp"
  54. namespace cv { namespace cudev {
  55. //! @addtogroup cudev
  56. //! @{
  57. template <class Policy, class SrcPtr, typename DstType, class MaskPtr>
  58. __host__ void gridCopy_(const SrcPtr& src, GpuMat_<DstType>& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  59. {
  60. const int rows = getRows(src);
  61. const int cols = getCols(src);
  62. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  63. dst.create(rows, cols);
  64. grid_copy_detail::copy<Policy>(shrinkPtr(src), shrinkPtr(dst), shrinkPtr(mask), rows, cols, StreamAccessor::getStream(stream));
  65. }
  66. template <class Policy, class SrcPtr, typename DstType, class MaskPtr>
  67. __host__ void gridCopy_(const SrcPtr& src, const GlobPtrSz<DstType>& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  68. {
  69. const int rows = getRows(src);
  70. const int cols = getCols(src);
  71. CV_Assert( getRows(dst) == rows && getCols(dst) == cols );
  72. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  73. grid_copy_detail::copy<Policy>(shrinkPtr(src), shrinkPtr(dst), shrinkPtr(mask), rows, cols, StreamAccessor::getStream(stream));
  74. }
  75. template <class Policy, class SrcPtr, typename DstType>
  76. __host__ void gridCopy_(const SrcPtr& src, GpuMat_<DstType>& dst, Stream& stream = Stream::Null())
  77. {
  78. const int rows = getRows(src);
  79. const int cols = getCols(src);
  80. dst.create(rows, cols);
  81. grid_copy_detail::copy<Policy>(shrinkPtr(src), shrinkPtr(dst), WithOutMask(), rows, cols, StreamAccessor::getStream(stream));
  82. }
  83. template <class Policy, class SrcPtr, typename DstType>
  84. __host__ void gridCopy_(const SrcPtr& src, const GlobPtrSz<DstType>& dst, Stream& stream = Stream::Null())
  85. {
  86. const int rows = getRows(src);
  87. const int cols = getCols(src);
  88. CV_Assert( getRows(dst) == rows && getCols(dst) == cols );
  89. grid_copy_detail::copy<Policy>(shrinkPtr(src), shrinkPtr(dst), WithOutMask(), rows, cols, StreamAccessor::getStream(stream));
  90. }
  91. template <class Policy, class SrcPtrTuple, typename D0, typename D1, class MaskPtr>
  92. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>& >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  93. {
  94. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 2, "" );
  95. const int rows = getRows(src);
  96. const int cols = getCols(src);
  97. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  98. get<0>(dst).create(rows, cols);
  99. get<1>(dst).create(rows, cols);
  100. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  101. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst))),
  102. shrinkPtr(mask),
  103. rows, cols,
  104. StreamAccessor::getStream(stream));
  105. }
  106. template <class Policy, class SrcPtrTuple, typename D0, typename D1, class MaskPtr>
  107. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1> >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  108. {
  109. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 2, "" );
  110. const int rows = getRows(src);
  111. const int cols = getCols(src);
  112. CV_Assert( getRows(get<0>(dst)) == rows && getCols(get<0>(dst)) == cols );
  113. CV_Assert( getRows(get<1>(dst)) == rows && getCols(get<1>(dst)) == cols );
  114. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  115. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  116. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst))),
  117. shrinkPtr(mask),
  118. rows, cols,
  119. StreamAccessor::getStream(stream));
  120. }
  121. template <class Policy, class SrcPtrTuple, typename D0, typename D1>
  122. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>& >& dst, Stream& stream = Stream::Null())
  123. {
  124. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 2, "" );
  125. const int rows = getRows(src);
  126. const int cols = getCols(src);
  127. get<0>(dst).create(rows, cols);
  128. get<1>(dst).create(rows, cols);
  129. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  130. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst))),
  131. WithOutMask(),
  132. rows, cols,
  133. StreamAccessor::getStream(stream));
  134. }
  135. template <class Policy, class SrcPtrTuple, typename D0, typename D1>
  136. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1> >& dst, Stream& stream = Stream::Null())
  137. {
  138. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 2, "" );
  139. const int rows = getRows(src);
  140. const int cols = getCols(src);
  141. CV_Assert( getRows(get<0>(dst)) == rows && getCols(get<0>(dst)) == cols );
  142. CV_Assert( getRows(get<1>(dst)) == rows && getCols(get<1>(dst)) == cols );
  143. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  144. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst))),
  145. WithOutMask(),
  146. rows, cols,
  147. StreamAccessor::getStream(stream));
  148. }
  149. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2, class MaskPtr>
  150. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>& >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  151. {
  152. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 3, "" );
  153. const int rows = getRows(src);
  154. const int cols = getCols(src);
  155. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  156. get<0>(dst).create(rows, cols);
  157. get<1>(dst).create(rows, cols);
  158. get<2>(dst).create(rows, cols);
  159. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  160. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst))),
  161. shrinkPtr(mask),
  162. rows, cols,
  163. StreamAccessor::getStream(stream));
  164. }
  165. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2, class MaskPtr>
  166. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2> >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  167. {
  168. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 3, "" );
  169. const int rows = getRows(src);
  170. const int cols = getCols(src);
  171. CV_Assert( getRows(get<0>(dst)) == rows && getCols(get<0>(dst)) == cols );
  172. CV_Assert( getRows(get<1>(dst)) == rows && getCols(get<1>(dst)) == cols );
  173. CV_Assert( getRows(get<2>(dst)) == rows && getCols(get<2>(dst)) == cols );
  174. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  175. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  176. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst))),
  177. shrinkPtr(mask),
  178. rows, cols,
  179. StreamAccessor::getStream(stream));
  180. }
  181. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2>
  182. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>& >& dst, Stream& stream = Stream::Null())
  183. {
  184. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 3, "" );
  185. const int rows = getRows(src);
  186. const int cols = getCols(src);
  187. get<0>(dst).create(rows, cols);
  188. get<1>(dst).create(rows, cols);
  189. get<2>(dst).create(rows, cols);
  190. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  191. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst))),
  192. WithOutMask(),
  193. rows, cols,
  194. StreamAccessor::getStream(stream));
  195. }
  196. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2>
  197. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2> >& dst, Stream& stream = Stream::Null())
  198. {
  199. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 3, "" );
  200. const int rows = getRows(src);
  201. const int cols = getCols(src);
  202. CV_Assert( getRows(get<0>(dst)) == rows && getCols(get<0>(dst)) == cols );
  203. CV_Assert( getRows(get<1>(dst)) == rows && getCols(get<1>(dst)) == cols );
  204. CV_Assert( getRows(get<2>(dst)) == rows && getCols(get<2>(dst)) == cols );
  205. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  206. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst))),
  207. WithOutMask(),
  208. rows, cols,
  209. StreamAccessor::getStream(stream));
  210. }
  211. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3, class MaskPtr>
  212. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>&, GpuMat_<D3>& >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  213. {
  214. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 4, "" );
  215. const int rows = getRows(src);
  216. const int cols = getCols(src);
  217. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  218. get<0>(dst).create(rows, cols);
  219. get<1>(dst).create(rows, cols);
  220. get<2>(dst).create(rows, cols);
  221. get<3>(dst).create(rows, cols);
  222. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  223. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst), get<3>(dst))),
  224. shrinkPtr(mask),
  225. rows, cols,
  226. StreamAccessor::getStream(stream));
  227. }
  228. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3, class MaskPtr>
  229. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2>, GlobPtrSz<D3> >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  230. {
  231. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 4, "" );
  232. const int rows = getRows(src);
  233. const int cols = getCols(src);
  234. CV_Assert( getRows(get<0>(dst)) == rows && getCols(get<0>(dst)) == cols );
  235. CV_Assert( getRows(get<1>(dst)) == rows && getCols(get<1>(dst)) == cols );
  236. CV_Assert( getRows(get<2>(dst)) == rows && getCols(get<2>(dst)) == cols );
  237. CV_Assert( getRows(get<3>(dst)) == rows && getCols(get<3>(dst)) == cols );
  238. CV_Assert( getRows(mask) == rows && getCols(mask) == cols );
  239. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  240. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst), get<3>(dst))),
  241. shrinkPtr(mask),
  242. rows, cols,
  243. StreamAccessor::getStream(stream));
  244. }
  245. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3>
  246. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>&, GpuMat_<D3>& >& dst, Stream& stream = Stream::Null())
  247. {
  248. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 4, "" );
  249. const int rows = getRows(src);
  250. const int cols = getCols(src);
  251. get<0>(dst).create(rows, cols);
  252. get<1>(dst).create(rows, cols);
  253. get<2>(dst).create(rows, cols);
  254. get<3>(dst).create(rows, cols);
  255. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  256. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst), get<3>(dst))),
  257. WithOutMask(),
  258. rows, cols,
  259. StreamAccessor::getStream(stream));
  260. }
  261. template <class Policy, class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3>
  262. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2>, GlobPtrSz<D3> >& dst, Stream& stream = Stream::Null())
  263. {
  264. CV_StaticAssert( tuple_size<SrcPtrTuple>::value == 4, "" );
  265. const int rows = getRows(src);
  266. const int cols = getCols(src);
  267. CV_Assert( getRows(get<0>(dst)) == rows && getCols(get<0>(dst)) == cols );
  268. CV_Assert( getRows(get<1>(dst)) == rows && getCols(get<1>(dst)) == cols );
  269. CV_Assert( getRows(get<2>(dst)) == rows && getCols(get<2>(dst)) == cols );
  270. CV_Assert( getRows(get<3>(dst)) == rows && getCols(get<3>(dst)) == cols );
  271. grid_copy_detail::copy_tuple<Policy>(shrinkPtr(src),
  272. shrinkPtr(zipPtr(get<0>(dst), get<1>(dst), get<2>(dst), get<3>(dst))),
  273. WithOutMask(),
  274. rows, cols,
  275. StreamAccessor::getStream(stream));
  276. }
  277. // Default Policy
  278. struct DefaultCopyPolicy
  279. {
  280. enum {
  281. block_size_x = 32,
  282. block_size_y = 8
  283. };
  284. };
  285. template <class SrcPtr, typename DstType, class MaskPtr>
  286. __host__ void gridCopy(const SrcPtr& src, GpuMat_<DstType>& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  287. {
  288. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  289. }
  290. template <class SrcPtr, typename DstType, class MaskPtr>
  291. __host__ void gridCopy(const SrcPtr& src, const GlobPtrSz<DstType>& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  292. {
  293. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  294. }
  295. template <class SrcPtr, typename DstType>
  296. __host__ void gridCopy(const SrcPtr& src, GpuMat_<DstType>& dst, Stream& stream = Stream::Null())
  297. {
  298. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  299. }
  300. template <class SrcPtr, typename DstType>
  301. __host__ void gridCopy(const SrcPtr& src, const GlobPtrSz<DstType>& dst, Stream& stream = Stream::Null())
  302. {
  303. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  304. }
  305. template <class SrcPtrTuple, typename D0, typename D1, class MaskPtr>
  306. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>& >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  307. {
  308. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  309. }
  310. template <class SrcPtrTuple, typename D0, typename D1, class MaskPtr>
  311. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1> >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  312. {
  313. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  314. }
  315. template <class SrcPtrTuple, typename D0, typename D1>
  316. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>& >& dst, Stream& stream = Stream::Null())
  317. {
  318. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  319. }
  320. template <class SrcPtrTuple, typename D0, typename D1>
  321. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1> >& dst, Stream& stream = Stream::Null())
  322. {
  323. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  324. }
  325. template <class SrcPtrTuple, typename D0, typename D1, typename D2, class MaskPtr>
  326. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>& >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  327. {
  328. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  329. }
  330. template <class SrcPtrTuple, typename D0, typename D1, typename D2, class MaskPtr>
  331. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2> >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  332. {
  333. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  334. }
  335. template <class SrcPtrTuple, typename D0, typename D1, typename D2>
  336. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>& >& dst, Stream& stream = Stream::Null())
  337. {
  338. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  339. }
  340. template <class SrcPtrTuple, typename D0, typename D1, typename D2>
  341. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2> >& dst, Stream& stream = Stream::Null())
  342. {
  343. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  344. }
  345. template <class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3, class MaskPtr>
  346. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>&, GpuMat_<D3>& >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  347. {
  348. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  349. }
  350. template <class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3, class MaskPtr>
  351. __host__ void gridCopy(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2>, GlobPtrSz<D3> >& dst, const MaskPtr& mask, Stream& stream = Stream::Null())
  352. {
  353. gridCopy_<DefaultCopyPolicy>(src, dst, mask, stream);
  354. }
  355. template <class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3>
  356. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GpuMat_<D0>&, GpuMat_<D1>&, GpuMat_<D2>&, GpuMat_<D3>& >& dst, Stream& stream = Stream::Null())
  357. {
  358. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  359. }
  360. template <class SrcPtrTuple, typename D0, typename D1, typename D2, typename D3>
  361. __host__ void gridCopy_(const SrcPtrTuple& src, const tuple< GlobPtrSz<D0>, GlobPtrSz<D1>, GlobPtrSz<D2>, GlobPtrSz<D3> >& dst, Stream& stream = Stream::Null())
  362. {
  363. gridCopy_<DefaultCopyPolicy>(src, dst, stream);
  364. }
  365. //! @}
  366. }}
  367. #endif