OmniSciDB
a5dc49c757
|
A range over which to iterate. More...
#include <threading_std.h>
Public Types | |
using | const_iterator = Value |
Type of a value. More... | |
using | size_type = std::size_t |
Type for size of a range. More... | |
Public Member Functions | |
blocked_range (Value begin_, Value end_) | |
Construct range over half-open interval [begin,end), with the given grainsize. More... | |
const_iterator | begin () const |
Beginning of range. More... | |
const_iterator | end () const |
One past last value in range. More... | |
size_type | size () const |
Size of the range. More... | |
size_type | grainsize () const |
The grain size for this range. More... | |
bool | empty () const |
True if range is empty. More... | |
bool | is_divisible () const |
True if range is divisible. More... | |
blocked_range (blocked_range &r, split) | |
Split range. More... | |
Static Private Member Functions | |
static Value | do_split (blocked_range &r, split) |
Auxiliary function used by the splitting constructor. More... | |
Private Attributes | |
Value | my_end |
Value | my_begin |
A range over which to iterate.
Definition at line 21 of file threading_std.h.
using threading_common::blocked_range< Value >::const_iterator = Value |
Type of a value.
Called a const_iterator for sake of algorithms that need to treat a blocked_range as an STL container.
Definition at line 26 of file threading_std.h.
using threading_common::blocked_range< Value >::size_type = std::size_t |
Type for size of a range.
Definition at line 29 of file threading_std.h.
|
inline |
Construct range over half-open interval [begin,end), with the given grainsize.
Definition at line 32 of file threading_std.h.
|
inline |
Split range.
The new Range *this has the second part, the old range r has the first part. Unspecified if end()<begin() or !is_divisible().
Definition at line 69 of file threading_std.h.
References threading_common::blocked_range< Value >::my_begin, and threading_common::blocked_range< Value >::my_end.
|
inline |
Beginning of range.
Definition at line 40 of file threading_std.h.
References threading_common::blocked_range< Value >::my_begin.
Referenced by threading_serial::parallel_for(), threading_std::parallel_for(), threading_serial::parallel_reduce(), threading_std::parallel_reduce(), and threading_common::blocked_range< Value >::size().
|
inlinestaticprivate |
Auxiliary function used by the splitting constructor.
Definition at line 87 of file threading_std.h.
References threading_common::blocked_range< Value >::is_divisible(), threading_common::blocked_range< Value >::my_begin, and threading_common::blocked_range< Value >::my_end.
|
inline |
True if range is empty.
Definition at line 60 of file threading_std.h.
References threading_common::blocked_range< Value >::my_begin, and threading_common::blocked_range< Value >::my_end.
|
inline |
One past last value in range.
Definition at line 43 of file threading_std.h.
References threading_common::blocked_range< Value >::my_end.
Referenced by threading_serial::parallel_for(), threading_std::parallel_for(), threading_serial::parallel_reduce(), threading_std::parallel_reduce(), and threading_common::blocked_range< Value >::size().
|
inline |
The grain size for this range.
Definition at line 53 of file threading_std.h.
|
inline |
True if range is divisible.
Definition at line 64 of file threading_std.h.
References threading_common::blocked_range< Value >::size().
Referenced by threading_common::blocked_range< Value >::do_split().
|
inline |
Size of the range.
Definition at line 47 of file threading_std.h.
References threading_common::blocked_range< Value >::begin(), threading_common::blocked_range< Value >::end(), threading_common::blocked_range< Value >::my_begin, and threading_common::blocked_range< Value >::my_end.
Referenced by threading_common::blocked_range< Value >::is_divisible(), threading_serial::parallel_for(), threading_std::parallel_for(), threading_serial::parallel_reduce(), and threading_std::parallel_reduce().
|
private |
Definition at line 83 of file threading_std.h.
Referenced by threading_common::blocked_range< Value >::begin(), threading_common::blocked_range< Value >::blocked_range(), threading_common::blocked_range< Value >::do_split(), threading_common::blocked_range< Value >::empty(), and threading_common::blocked_range< Value >::size().
|
private |
NOTE: my_end MUST be declared before my_begin, otherwise the splitting constructor will break.
Definition at line 82 of file threading_std.h.
Referenced by threading_common::blocked_range< Value >::blocked_range(), threading_common::blocked_range< Value >::do_split(), threading_common::blocked_range< Value >::empty(), threading_common::blocked_range< Value >::end(), and threading_common::blocked_range< Value >::size().