Ask Your Question

Revision history [back]

parallel_for_

I'm not sure, that I can understand parallel_for_... I write simple class:

//header
class ParallelClass: public cv::ParallelLoopBody
{
    private:

    public:
    ParallelClass();
    void operator()( const cv::Range &r )const;
};
//cpp
 ParallelClass::ParallelClass(){}
 void ParallelClass::operator()( const cv::Range &r )const{
    cout<<"start"<<endl;
  }

and in the main function:

  parallel_for_(cv::Range(0,10), ParallelClass());

I was expecting to see ten times "start",,, but looks like I'm totally wrong...

parallel_for_

I'm not sure, that I can understand parallel_for_... I write wrote simple class:

//header
class ParallelClass: public cv::ParallelLoopBody
{
    private:

    public:
    ParallelClass();
    void operator()( const cv::Range &r )const;
};
//cpp
 ParallelClass::ParallelClass(){}
 void ParallelClass::operator()( const cv::Range &r )const{
    cout<<"start"<<endl;
  }

and in the main function:

  parallel_for_(cv::Range(0,10), ParallelClass());

I was expecting to see ten times "start",,, but looks like I'm totally wrong...