45 virtual void prepare(
long num_threads,
long chunk_size) {};
Base class for all parallelized operations.
virtual void finalize()
Called after all threads have finished their tasks.
virtual ~TaskGenerator()=default
virtual void run_tasks(long begin, long end, thread_id_t thread_id)=0
virtual void prepare(long num_threads, long chunk_size)
Called to notify the TaskGenerator about the number of threads.
virtual long num_tasks() const =0
virtual void init_thread(thread_id_t thread_id)
Called once a thread has spun up, but before it runs its first task.
Strong typedef for an int to signify a thread id.