@@ -247,6 +247,9 @@ class GpuProcessingTask<U>::GpuProcessingTaskImpl {
247247
248248public:
249249
250+ // TODO: Remove need for passing 'levels' to GpuProcessingTask
251+ // It was used during development to control internal computation like filters, gradient, levels etc. but
252+ // once all is done there is no need for it anymore
250253 GpuProcessingTaskImpl (const PixelData<ImgType> &inputImage, PixelData<float > &levels, const APRParameters ¶meters, float bspline_offset, int maxLevel) :
251254 iCpuImage (inputImage),
252255 iCpuLevels (levels),
@@ -272,16 +275,16 @@ public:
272275 y_vec (nullptr , iAprInfo.getSize(), iStream)
273276 {
274277// std::cout << "\n=============== GpuProcessingTaskImpl ===================\n\n";
275- std::cout << iCpuImage << std::endl;
276- std::cout << iCpuLevels << std::endl;
278+ // std::cout << iCpuImage << std::endl;
279+ // std::cout << iCpuLevels << std::endl;
277280 }
278281
279282 void sendDataToGpu () {
280- CurrentTime ct;
281- uint64_t start = ct.microseconds ();
283+ // CurrentTime ct;
284+ // uint64_t start = ct.microseconds();
282285 image.copyH2D ();
283- checkCuda (cudaStreamSynchronize (iStream));
284- std::cout << " SEND time: " << ct.microseconds () - start << std::endl;
286+ // checkCuda(cudaStreamSynchronize(iStream));
287+ // std::cout << "SEND time: " << ct.microseconds() - start << std::endl;
285288 }
286289
287290 LinearAccessCudaStructs getDataFromGpu () {
@@ -313,18 +316,14 @@ public:
313316 getGradientCuda (iCpuImage, iCpuLevels, image.get (), gradient.get (), local_scale_temp.get (),
314317 splineCudaX, splineCudaY, splineCudaZ, boundary.get (),
315318 iBsplineOffset, iParameters, iStream);
316- std::cout << " 1: " << ct.microseconds () - start << std::endl;
317319 runLocalIntensityScalePipeline (iCpuLevels, iParameters, local_scale_temp.get (), local_scale_temp2.get (), iStream);
318- std::cout << " 2: " << ct.microseconds () - start << std::endl;
319320 float min_dim = std::min (iParameters.dy , std::min (iParameters.dx , iParameters.dz ));
320321 float level_factor = pow (2 , iMaxLevel) * min_dim;
321322 const float mult_const = level_factor/iParameters.rel_error ;
322323 runComputeLevels (gradient.get (), local_scale_temp.get (), iCpuLevels.mesh .size (), mult_const, iStream);
323- std::cout << " 3: " << ct.microseconds () - start << std::endl;
324324
325325 computeOvpcCuda (local_scale_temp.get (), pctc, iAprInfo, iStream);
326326 computeLinearStructureCuda (y_vec.get (), pctc, iAprInfo, iParameters, lacs, iStream);
327- std::cout << iAprInfo << std::endl;
328327 }
329328
330329 ~GpuProcessingTaskImpl () {
@@ -335,10 +334,10 @@ public:
335334
336335template <typename ImgType>
337336GpuProcessingTask<ImgType>::GpuProcessingTask(const PixelData<ImgType> &image, PixelData<float > &levels, const APRParameters ¶meters, float bspline_offset, int maxLevel)
338- : impl{new GpuProcessingTaskImpl<ImgType>(image, levels, parameters, bspline_offset, maxLevel)} {std::cout << " GpuProcessingTask \n " ; }
337+ : impl{new GpuProcessingTaskImpl<ImgType>(image, levels, parameters, bspline_offset, maxLevel)} { }
339338
340339template <typename ImgType>
341- GpuProcessingTask<ImgType>::~GpuProcessingTask () {std::cout << " ~GpuProcessingTask \n " ; }
340+ GpuProcessingTask<ImgType>::~GpuProcessingTask () { }
342341
343342template <typename ImgType>
344343GpuProcessingTask<ImgType>::GpuProcessingTask(GpuProcessingTask&&) = default ;
0 commit comments