![]() |
Reference documentation for deal.II version 8.1.0
|
#include <work_stream.h>
Classes | |
struct | ItemType |
Public Member Functions | |
IteratorRangeToItemStream (const typename std::vector< Iterator >::const_iterator &begin, const typename std::vector< Iterator >::const_iterator &end, const unsigned int buffer_size, const unsigned int chunk_size, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data) | |
virtual void * | operator() (void *) |
Private Member Functions | |
void | init_buffer_elements (const unsigned int element) |
Private Attributes | |
std::pair< typename std::vector< Iterator >::const_iterator, typename std::vector< Iterator >::const_iterator > | remaining_iterator_range |
std::vector< ItemType > | item_buffer |
Threads::ThreadLocalStorage< typename ItemType::ScratchAndCopyDataList > | thread_local_scratch_and_copy |
const ScratchData & | sample_scratch_data |
const CopyData & | sample_copy_data |
const unsigned int | chunk_size |
A class that creates a sequence of items from a range of iterators.
Definition at line 727 of file work_stream.h.
|
inline |
Constructor. Take range of iterators into an array of the kind of object we want to loop over, the size of a buffer that can hold items, and the sample additional data object that will be passed to each worker and copier function invokation.
Definition at line 848 of file work_stream.h.
|
inlinevirtual |
Create an item and return a pointer to it.
Definition at line 886 of file work_stream.h.
|
inlineprivate |
Initialize the pointers and vector elements in the specified entry of the item_buffer.
Definition at line 986 of file work_stream.h.
|
private |
The interval of iterators still to be worked on. This range will shrink over time.
Definition at line 937 of file work_stream.h.
|
private |
A buffer that will store items.
Definition at line 942 of file work_stream.h.
|
private |
Pointer to a thread local variable identifying the scratch and copy data objects each thread will use. The same is true as discussed for the implementation in the Implementation2::IteratorRangeToItemStream class and the paper by Turcksin, Kronbichler and Bangerth (see workstream_paper).
Definition at line 951 of file work_stream.h.
|
private |
A reference to a sample scratch data that will be used to initialize the thread-local pointers to a scratch data object each of the worker tasks uses.
Definition at line 958 of file work_stream.h.
|
private |
A reference to a sample scratch data that will be used to initialize the thread-local pointers to a scratch data object each of the worker tasks uses.
Definition at line 965 of file work_stream.h.
|
private |
Number of elements of the iterator range that each thread should work on sequentially; a large number makes sure that each thread gets a significant amount of work before the next task switch happens, whereas a small number is better for load balancing.
Definition at line 979 of file work_stream.h.