IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CudaSubImageSplitOperators.h
Go to the documentation of this file.
1 // CudaSubImageSplitOperators.h:
3 // -------------------------
4 //
14 
15 #ifndef __IPSDKIMAGEPROCESSING_CUDASUBIMAGESPLITOPERATORS_H__
16 #define __IPSDKIMAGEPROCESSING_CUDASUBIMAGESPLITOPERATORS_H__
17 
19 #include <IPSDKImageProcessing/DataSplit/SubImage/CudaSubImageSplit.h>
20 #include <IPSDKBaseProcessing/ProcessorDispatcher/Static/StaticProcessorDispatcher.h>
21 #include <IPSDKImage/Image/BaseImage.h>
23 #include <boost/make_shared.hpp>
24 #include <boost/utility/enable_if.hpp>
25 #include <boost/mpl/equal_to.hpp>
26 #include <boost/mpl/not_equal_to.hpp>
27 
28 namespace ipsdk {
29 namespace imaproc {
30 
33 
36 template <typename TProcessor, typename TAttribute>
37 inline boost::shared_ptr<CudaSubImageSplit<TProcessor, TAttribute> >
38 splitGpu(const image::ImagePtr& pImage)
39 {
41  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
42 
43  const ipsdk::image::CudaImage& cudaImage = static_cast<const ipsdk::image::CudaImage&>(*pImage);
44  //const ipUInt64 nbDevices = cudaImage.getNbDevices();
45 
47  //nbDevices,
48  pImage);
49 
50  return pDataSplit;
51 }
52 template <typename TProcessor, typename TAttribute>
53 inline boost::shared_ptr<CudaSubImageSplit<TProcessor, TAttribute> >
55 {
57  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
58 
59  const ipsdk::image::CudaImage& cudaImage = static_cast<const ipsdk::image::CudaImage&>(*pImage);
60  //const ipUInt64 nbDevices = cudaImage.getNbDevices();
61 
63  //nbDevices,
64  pImage);
65 
66  return pDataSplit;
67 }
68 template <typename TProcessor, typename TAttribute, typename TInputAttribute>
69 inline boost::shared_ptr<CudaSubImageSplit<TProcessor, TAttribute> >
70 splitGpu(const boost::shared_ptr<TInputAttribute>& pInputAttribute)
71 {
72  return splitGpu<TProcessor, TAttribute>(pInputAttribute->getStorage());
73 }
75 
78 
79 } // end of namespace imaproc
80 } // end of namespace ipsdk
81 
82 #endif // __IPSDKIMAGEPROCESSING_CUDASUBIMAGESPLITOPERATORS_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Image splitted in on several GPU devices.
Definition: SubImageSplitTypes.h:48
boost::shared_ptr< CudaSubImageSplit< TProcessor, TAttribute > > splitGpu(const image::ImagePtr &pImage)
create a splitted image operation used for data dispatch on GPUs
Definition: CudaSubImageSplitOperators.h:38
boost::shared_ptr< BaseImage > ImagePtr
Definition: ImageTypes.h:139
boost::shared_ptr< const BaseImage > ImageConstPtr
Definition: ImageTypes.h:140
Definition: CudaImage.h:28
virtual BoolResult init(const BaseImageGeometry &geometry)
image initialization
Predefined operators for static data split used for data dispatch.
Class used to split image into sub images for data dispatch on NVidia graphic cards.
Definition: CudaSubImageSplit.h:36