I am new to TBB. I met a problem, I hope you guys can give me some advise.
A class named Fruit:
Fruit.hpp:
class Fruit {
protected :
void A(...);
void B(..);
public :
Fruit();
~ Fruit();
void l1(....);
void l2(...);
};
Fruit.cpp:
custom_TBB (...){
//How to call the method A of Fruit?
}
class Fruit {
...
Fruit::l1(....){
tbb::task_scheduler_init init(numberOfThreads);
parallel_for(tbb::blocked_range<int>(0,End,10000),custom_TBB (...));
}
...
};
Because I need to use parallel method in the function of l1.
I am not sure whether my understanding of TBB is right to not?
I would like to know how can I make this works?
Thank you first.
This is my idea:
1. I tried to declare custom_TBB inside the class Fruit, and implement it here, but failed.
2. I tried to define custom_TBB inside the function of l1, but also failed.