17 #ifndef __TBB_blocked_range_H 18 #define __TBB_blocked_range_H 28 template<
typename Value,
unsigned int N,
typename>
44 template<
typename Value>
55 #if __TBB_DEPRECATED_BLOCKED_RANGE_DEFAULT_CTOR 63 my_end(end_), my_begin(begin_), my_grainsize(grainsize_)
65 __TBB_ASSERT( my_grainsize>0,
"grainsize must be positive" );
69 const_iterator
begin()
const {
return my_begin;}
72 const_iterator
end()
const {
return my_end;}
78 return size_type(my_end-my_begin);
89 bool empty()
const {
return !(my_begin<my_end);}
100 my_begin(do_split(r,
split())),
101 my_grainsize(r.my_grainsize)
107 #if __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES 108 static const bool is_splittable_in_proportion =
true;
116 my_begin(do_split(r, proportion)),
117 my_grainsize(r.my_grainsize)
139 #if __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES 150 size_type right_part = size_type(
float(r.
size()) *
float(proportion.
right())
151 /
float(proportion.
left() + proportion.
right()) + 0.5f);
156 template<
typename RowValue,
typename ColValue>
159 template<
typename RowValue,
typename ColValue,
typename PageValue>
162 template<
typename DimValue,
unsigned int N,
typename>
A 2-dimensional range that models the Range concept.
static Value do_split(blocked_range &r, proportional_split &proportion)
static Value do_split(blocked_range &r, split)
Auxiliary function used by the splitting constructor.
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp end
size_type size() const
Size of the range.
Value const_iterator
Type of a value.
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp begin
bool is_divisible() const
True if range is divisible.
size_type grainsize() const
The grain size for this range.
const_iterator end() const
One past last value in range.
blocked_range(Value begin_, Value end_, size_type grainsize_=1)
Construct range over half-open interval [begin,end), with the given grainsize.
blocked_range(blocked_range &r, proportional_split &proportion)
Split range.
Type enables transmission of splitting proportion from partitioners to range objects.
A range over which to iterate.
std::size_t size_type
Type for size of a range.
Dummy type that distinguishes splitting constructor from copy constructor.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
A 3-dimensional range that models the Range concept.
const_iterator begin() const
Beginning of range.
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t size
bool empty() const
True if range is empty.
blocked_range(blocked_range &r, split)
Split range.