Advertisement
Guest User

Untitled

a guest
May 16th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1.     std::string img_path = vm["img-path"].as<std::string>();
  2.  
  3.     // schedule image loading on the opencv pool
  4.     hpx::future<cv::Mat> f_image = hpx::async(opencv_executor, &load_image,
  5.             img_path);
  6.  
  7.     // schedule image show on the opencv pool
  8.     hpx::future<void> f_imshow = hpx::async(opencv_executor, &show_image,
  9.                                             f_image.get());
  10.  
  11.     cv::Mat grey_image;
  12.     //schedule image processing on the default pool
  13.     hpx::future<bool> f_img_process = hpx::async(normal_priority_executor,
  14.             &transform_to_grey, f_image.get(), grey_image);
  15.  
  16.     f_img_process.get();
  17.  
  18.     // schedule image show on the opencv pool
  19.     hpx::future<void> f_imshow_grey = hpx::async(opencv_executor, &show_image,
  20.                                             grey_image);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement