Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::blocked_range2d< RowValue, ColValue > Class Template Reference

A 2-dimensional range that models the Range concept. More...

#include <blocked_range2d.h>

Collaboration diagram for tbb::blocked_range2d< RowValue, ColValue >:

Public Types

typedef blocked_range< RowValue > row_range_type
 Type for size of an iteration range. More...
 
typedef blocked_range< ColValue > col_range_type
 

Public Member Functions

 blocked_range2d (RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize)
 
 blocked_range2d (RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)
 
bool empty () const
 True if range is empty. More...
 
bool is_divisible () const
 True if range is divisible into two pieces. More...
 
 blocked_range2d (blocked_range2d &r, split)
 
 blocked_range2d (blocked_range2d &r, proportional_split &proportion)
 
const row_range_typerows () const
 The rows of the iteration space. More...
 
const col_range_typecols () const
 The columns of the iteration space. More...
 

Static Public Attributes

static const bool is_splittable_in_proportion = true
 Static field to support proportional split. More...
 

Private Member Functions

template<typename Split >
void do_split (blocked_range2d &r, Split &split_obj)
 

Private Attributes

row_range_type my_rows
 
col_range_type my_cols
 

Detailed Description

template<typename RowValue, typename ColValue = RowValue>
class tbb::blocked_range2d< RowValue, ColValue >

A 2-dimensional range that models the Range concept.

Definition at line 28 of file blocked_range2d.h.

Member Typedef Documentation

◆ col_range_type

template<typename RowValue , typename ColValue = RowValue>
typedef blocked_range<ColValue> tbb::blocked_range2d< RowValue, ColValue >::col_range_type

Definition at line 32 of file blocked_range2d.h.

◆ row_range_type

template<typename RowValue , typename ColValue = RowValue>
typedef blocked_range<RowValue> tbb::blocked_range2d< RowValue, ColValue >::row_range_type

Type for size of an iteration range.

Definition at line 31 of file blocked_range2d.h.

Constructor & Destructor Documentation

◆ blocked_range2d() [1/4]

template<typename RowValue , typename ColValue = RowValue>
tbb::blocked_range2d< RowValue, ColValue >::blocked_range2d ( RowValue  row_begin,
RowValue  row_end,
typename row_range_type::size_type  row_grainsize,
ColValue  col_begin,
ColValue  col_end,
typename col_range_type::size_type  col_grainsize 
)
inline

Definition at line 40 of file blocked_range2d.h.

41  :
42  my_rows(row_begin,row_end,row_grainsize),
43  my_cols(col_begin,col_end,col_grainsize)
44  {}
col_range_type my_cols
row_range_type my_rows

◆ blocked_range2d() [2/4]

template<typename RowValue , typename ColValue = RowValue>
tbb::blocked_range2d< RowValue, ColValue >::blocked_range2d ( RowValue  row_begin,
RowValue  row_end,
ColValue  col_begin,
ColValue  col_end 
)
inline

Definition at line 46 of file blocked_range2d.h.

47  :
48  my_rows(row_begin,row_end),
49  my_cols(col_begin,col_end)
50  {}
col_range_type my_cols
row_range_type my_rows

◆ blocked_range2d() [3/4]

template<typename RowValue , typename ColValue = RowValue>
tbb::blocked_range2d< RowValue, ColValue >::blocked_range2d ( blocked_range2d< RowValue, ColValue > &  r,
split   
)
inline

Definition at line 63 of file blocked_range2d.h.

63  :
64  my_rows(r.my_rows),
65  my_cols(r.my_cols)
66  {
67  split split_obj;
68  do_split(r, split_obj);
69  }
void do_split(blocked_range2d &r, Split &split_obj)
col_range_type my_cols
row_range_type my_rows

References tbb::blocked_range2d< RowValue, ColValue >::do_split().

Here is the call graph for this function:

◆ blocked_range2d() [4/4]

template<typename RowValue , typename ColValue = RowValue>
tbb::blocked_range2d< RowValue, ColValue >::blocked_range2d ( blocked_range2d< RowValue, ColValue > &  r,
proportional_split proportion 
)
inline

Definition at line 75 of file blocked_range2d.h.

75  :
76  my_rows(r.my_rows),
77  my_cols(r.my_cols)
78  {
79  do_split(r, proportion);
80  }
void do_split(blocked_range2d &r, Split &split_obj)
col_range_type my_cols
row_range_type my_rows

References tbb::blocked_range2d< RowValue, ColValue >::do_split().

Here is the call graph for this function:

Member Function Documentation

◆ cols()

template<typename RowValue , typename ColValue = RowValue>
const col_range_type& tbb::blocked_range2d< RowValue, ColValue >::cols ( ) const
inline

The columns of the iteration space.

Definition at line 87 of file blocked_range2d.h.

87 {return my_cols;}
col_range_type my_cols

References tbb::blocked_range2d< RowValue, ColValue >::my_cols.

◆ do_split()

template<typename RowValue , typename ColValue = RowValue>
template<typename Split >
void tbb::blocked_range2d< RowValue, ColValue >::do_split ( blocked_range2d< RowValue, ColValue > &  r,
Split &  split_obj 
)
inlineprivate

Definition at line 92 of file blocked_range2d.h.

93  {
94  if( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) {
95  my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);
96  } else {
97  my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);
98  }
99  }
size_type grainsize() const
The grain size for this range.
Definition: blocked_range.h:82
static ColValue do_split(blocked_range &r, split)
Auxiliary function used by the splitting constructor.
col_range_type my_cols
size_type size() const
Size of the range.
Definition: blocked_range.h:76
row_range_type my_rows

References tbb::blocked_range< ColValue >::do_split(), tbb::blocked_range< RowValue >::do_split(), tbb::blocked_range< Value >::grainsize(), tbb::blocked_range< Value >::my_begin, tbb::blocked_range2d< RowValue, ColValue >::my_cols, tbb::blocked_range2d< RowValue, ColValue >::my_rows, and tbb::blocked_range< Value >::size().

Referenced by tbb::blocked_range2d< RowValue, ColValue >::blocked_range2d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ empty()

template<typename RowValue , typename ColValue = RowValue>
bool tbb::blocked_range2d< RowValue, ColValue >::empty ( ) const
inline

True if range is empty.

Definition at line 53 of file blocked_range2d.h.

53  {
54  // Range is empty if at least one dimension is empty.
55  return my_rows.empty() || my_cols.empty();
56  }
bool empty() const
True if range is empty.
Definition: blocked_range.h:89
col_range_type my_cols
row_range_type my_rows

References tbb::blocked_range< Value >::empty(), tbb::blocked_range2d< RowValue, ColValue >::my_cols, and tbb::blocked_range2d< RowValue, ColValue >::my_rows.

Here is the call graph for this function:

◆ is_divisible()

template<typename RowValue , typename ColValue = RowValue>
bool tbb::blocked_range2d< RowValue, ColValue >::is_divisible ( ) const
inline

True if range is divisible into two pieces.

Definition at line 59 of file blocked_range2d.h.

59  {
61  }
col_range_type my_cols
row_range_type my_rows
bool is_divisible() const
True if range is divisible.
Definition: blocked_range.h:93

References tbb::blocked_range< Value >::is_divisible(), tbb::blocked_range2d< RowValue, ColValue >::my_cols, and tbb::blocked_range2d< RowValue, ColValue >::my_rows.

Here is the call graph for this function:

◆ rows()

template<typename RowValue , typename ColValue = RowValue>
const row_range_type& tbb::blocked_range2d< RowValue, ColValue >::rows ( ) const
inline

The rows of the iteration space.

Definition at line 84 of file blocked_range2d.h.

84 {return my_rows;}
row_range_type my_rows

References tbb::blocked_range2d< RowValue, ColValue >::my_rows.

Member Data Documentation

◆ is_splittable_in_proportion

template<typename RowValue , typename ColValue = RowValue>
const bool tbb::blocked_range2d< RowValue, ColValue >::is_splittable_in_proportion = true
static

Static field to support proportional split.

Definition at line 73 of file blocked_range2d.h.

◆ my_cols

◆ my_rows


The documentation for this class was generated from the following file:

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.