tbb::blocked_range2d< RowValue, ColValue > Class Template Reference
Algorithms

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_type & | rows () const
| The rows of the iteration space. More...
const col_range_type & | cols () 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.

:
my_rows(row_begin,row_end,row_grainsize),
my_cols(col_begin,col_end,col_grainsize)
{}

## 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.

:
my_rows(row_begin,row_end),
my_cols(col_begin,col_end)
{}

## 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.

:
my_rows(r.my_rows),
my_cols(r.my_cols)
{
split split_obj;
do_split(r, split_obj);
}

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.

:
my_rows(r.my_rows),
my_cols(r.my_cols)
{
do_split(r, proportion);
}

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.

{return 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
| ) |  |

inline private

Definition at line 92 of file blocked_range2d.h.

{
if( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) {
my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);
} else {
my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);
}
}

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.

{
// Range is empty if at least one dimension is empty.
return my_rows.empty() || my_cols.empty();
}

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.

{
return my_rows.is_divisible() || my_cols.is_divisible();
}

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.

{return 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

template<typename RowValue , typename ColValue = RowValue>

col_range_type tbb::blocked_range2d< RowValue, ColValue >::my_cols

private

Definition at line 36 of file blocked_range2d.h.

Referenced by tbb::blocked_range2d< RowValue, ColValue >::cols(), tbb::blocked_range2d< RowValue, ColValue >::do_split(), tbb::blocked_range2d< RowValue, ColValue >::empty(), and tbb::blocked_range2d< RowValue, ColValue >::is_divisible().

## my_rows

template<typename RowValue , typename ColValue = RowValue>

row_range_type tbb::blocked_range2d< RowValue, ColValue >::my_rows

private

Definition at line 35 of file blocked_range2d.h.

Referenced by tbb::blocked_range2d< RowValue, ColValue >::do_split(), tbb::blocked_range2d< RowValue, ColValue >::empty(), tbb::blocked_range2d< RowValue, ColValue >::is_divisible(), and tbb::blocked_range2d< RowValue, ColValue >::rows().

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

- blocked_range2d.h

tbb::blocked_range2d::my_cols
col_range_type my_cols
Definition: blocked_range2d.h:36
tbb::blocked_range::my_begin
Value my_begin
Definition: blocked_range.h:127
tbb::blocked_range< ColValue >::do_split
static ColValue do_split(blocked_range &r, split)
Auxiliary function used by the splitting constructor.
Definition: blocked_range.h:131
tbb::blocked_range2d::my_rows
row_range_type my_rows
Definition: blocked_range2d.h:35
tbb::blocked_range::grainsize
size_type grainsize() const
The grain size for this range.
Definition: blocked_range.h:82
tbb::blocked_range2d::do_split
void do_split(blocked_range2d &r, Split &split_obj)
Definition: blocked_range2d.h:92
tbb::blocked_range::size
size_type size() const
Size of the range.
Definition: blocked_range.h:76
tbb::blocked_range::is_divisible
bool is_divisible() const
True if range is divisible.
Definition: blocked_range.h:93
tbb::blocked_range::empty
bool empty() const
True if range is empty.
Definition: blocked_range.h:89

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.