21 #ifndef __TBB_blocked_range2d_H 22 #define __TBB_blocked_range2d_H 24 #include "tbb_stddef.h" 25 #include "blocked_range.h" 31 template<
typename RowValue,
typename ColValue=RowValue>
39 row_range_type my_rows;
40 col_range_type my_cols;
46 my_rows(row_begin,row_end,row_grainsize),
47 my_cols(col_begin,col_end,col_grainsize)
52 ColValue col_begin, ColValue col_end ) :
53 my_rows(row_begin,row_end),
54 my_cols(col_begin,col_end)
74 do_split(r, split_obj);
77 #if __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES 85 do_split(r, proportion);
89 template <
typename Split>
93 my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);
95 my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);
100 const row_range_type&
rows()
const {
return my_rows;}
103 const col_range_type&
cols()
const {
return my_cols;}
static const bool is_splittable_in_proportion
Static field to support proportional split.
Definition: blocked_range2d.h:79
const row_range_type & rows() const
The rows of the iteration space.
Definition: blocked_range2d.h:100
bool is_divisible() const
True if range is divisible into two pieces.
Definition: blocked_range2d.h:65
std::size_t size_type
Type for size of a range.
Definition: blocked_range.h:48
bool empty() const
True if range is empty.
Definition: blocked_range.h:82
size_type grainsize() const
The grain size for this range.
Definition: blocked_range.h:75
blocked_range< RowValue > row_range_type
Type for size of an iteration range.
Definition: blocked_range2d.h:35
const col_range_type & cols() const
The columns of the iteration space.
Definition: blocked_range2d.h:103
size_type size() const
Size of the range.
Definition: blocked_range.h:69
bool empty() const
True if range is empty.
Definition: blocked_range2d.h:59
A 2-dimensional range that models the Range concept.
Definition: blocked_range2d.h:32
bool is_divisible() const
True if range is divisible.
Definition: blocked_range.h:86
The namespace tbb contains all components of the library.
Definition: parallel_for.h:44