CPU GPU Performance Measurement
Does a cv::gpu API takes more time inside a for loop as compared to its corresponding C Style API in the for with same number of iterations.
i.e
` // GPU FOR LOOP
cv::gpu::GpuMat a , b; // assume they contain some data
for(int i = 0; i < 10180 ; i++)
cv::gpu::add(a ,b,a);
// CPU FOR LOOP
CvMat a1 , b1; //assume they contain some data
for(int i = 0; i < 10180 ; i++)
cvAdd(a1 ,b1,a1);
`
Timings:
GPU FOR LOOP : 0.87SEC
CPU FOR LOOP : 0.02SEC
why is it so ?