Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

GpuMat and std::vector

Hi all,

what is the appropriate way to store GpuMats in a container. So far I'm using std::vector<cv::gpu::gpumat> But I'm wondering how the GpuMats are stored in the vector. Does the vector create copies of the matrices on the GPU memory? If so, it's probably not very efficient. What would be the best solution? Would it make more sense to use std::vector<cv::gpumat> or better std::vector < boost::shared_ptr <cv::gpu::gpumat> > ?

Cheers, Andreas

GpuMat and std::vector

Hi all,

what is the appropriate way to store GpuMats in a container. So far I'm using std::vector<cv::gpu::gpumat> But I'm wondering how the GpuMats are stored in the vector. Does the vector create copies of the matrices on the GPU memory? If so, it's probably not very efficient. What would be the best solution? Would it make more sense to use std::vector<cv::gpumat> std::vector<cv::gpu::gpumat*> or better std::vector < boost::shared_ptr <cv::gpu::gpumat> > ?

Cheers, Andreas

click to hide/show revision 3
No.3 Revision

GpuMat and std::vector

Hi all,

what is the appropriate way to store GpuMats in a container. So far I'm using std::vector<cv::gpu::gpumat> std::vector<cv::gpu::GpuMat> But I'm wondering how the GpuMats are stored in the vector. Does the vector create copies of the matrices on the GPU memory? If so, it's probably not very efficient. What would be the best solution? Would it make more sense to use std::vector<cv::gpu::gpumat*> std::vector<cv::gpu::GpuMat*> or better std::vector < boost::shared_ptr <cv::gpu::gpumat> > <cv::gpu::GpuMat> > ?

Cheers, Andreas