Peano
Loading...
Searching...
No Matches
tbb::detail::d1 Namespace Reference

Typedefs

using dim_range_type = tbb::blocked_range< Value >
 Helper type to construct range with N tbb::blocked_range<value_type> objects.
 
template<typename Value , unsigned int N>
using blocked_nd_range = blocked_nd_range_impl< Value, N >
 

Functions

template<typename Value , unsigned int N, typename = detail::make_index_sequence<N>>
 __TBB_requires (blocked_range_value< Value >) class blocked_nd_range_impl
 
 blocked_nd_range_impl ()=delete
 
 blocked_nd_range_impl (Value end[N], typename tbb::blocked_range< value_type >::size_type grainsize)
 Newer TBB versions provide a constructor.
 
static constexpr unsigned int ndims ()
 Dimensionality of a range.
 
const tbb::blocked_range< value_type > & dim (unsigned int dimension) const
 Range in certain dimension.
 
bool empty () const
 True if at least one dimension is empty.
 
bool is_divisible () const
 True if at least one dimension is divisible.
 
 blocked_nd_range_impl (blocked_nd_range_impl &r, proportional_split proportion)
 
 blocked_nd_range_impl (blocked_nd_range_impl &r, split proportion)
 
template<typename split_type >
void do_split (blocked_nd_range_impl &r, split_type proportion)
 

Variables

 N
 
std::vector< tbb::blocked_range< value_type > > my_dims
 

Typedef Documentation

◆ blocked_nd_range

template<typename Value , unsigned int N>
using tbb::detail::d1::blocked_nd_range = typedef blocked_nd_range_impl<Value, N>
private

Definition at line 323 of file blocked_rangeNd.h.

◆ dim_range_type

using tbb::detail::d1::dim_range_type = typedef tbb::blocked_range<Value>
private

Helper type to construct range with N tbb::blocked_range<value_type> objects.

The "original" TBB version uses

template<std::size_t>
using dim_range_type = tbb::blocked_range<value_type>;
tbb::blocked_range< Value > dim_range_type
Helper type to construct range with N tbb::blocked_range<value_type> objects.

but some of our compilers struggle to have this using over a template employing yet another type that had been declared via a using statement (see above). When we use the declaration as below - which is equivalent

  • all seems to work however.

Definition at line 216 of file blocked_rangeNd.h.

Function Documentation

◆ __TBB_requires()

template<typename Value , unsigned int N, typename = detail::make_index_sequence<N>>
tbb::detail::d1::__TBB_requires ( blocked_range_value< Value >  )

◆ blocked_nd_range_impl() [1/4]

tbb::detail::d1::blocked_nd_range_impl ( )
delete

◆ blocked_nd_range_impl() [2/4]

tbb::detail::d1::blocked_nd_range_impl ( blocked_nd_range_impl &  r,
proportional_split  proportion 
)

Definition at line 282 of file blocked_rangeNd.h.

References do_split(), my_dims, and N.

Here is the call graph for this function:

◆ blocked_nd_range_impl() [3/4]

tbb::detail::d1::blocked_nd_range_impl ( blocked_nd_range_impl &  r,
split  proportion 
)

Definition at line 287 of file blocked_rangeNd.h.

References do_split(), my_dims, and N.

Here is the call graph for this function:

◆ blocked_nd_range_impl() [4/4]

tbb::detail::d1::blocked_nd_range_impl ( Value  end[N],
typename tbb::blocked_range< value_type >::size_type  grainsize 
)

Newer TBB versions provide a constructor.

blocked_nd_range_impl(const typename dim_range_type<Is>&... args) : my_dims{ {args...} } {
__TBB_ASSERT(my_dims.size()==N, "range is not properly initialised" );
}
blocked_nd_range_impl()=delete
std::vector< tbb::blocked_range< value_type > > my_dims

We don't use this particular constructor in Peano, but some compilers struggle with it. Therefore, I just comment it out.

Rationale

I originally had a begin array as well, but Intel colleagues pointed out that we'd better have no begin array but only a size array.

Definition at line 241 of file blocked_rangeNd.h.

References my_dims, and N.

◆ dim()

const tbb::blocked_range< value_type > & tbb::detail::d1::dim ( unsigned int  dimension) const

Range in certain dimension.

Definition at line 258 of file blocked_rangeNd.h.

References my_dims, and N.

◆ do_split()

template<typename split_type >
void tbb::detail::d1::do_split ( blocked_nd_range_impl &  r,
split_type  proportion 
)
private

Definition at line 303 of file blocked_rangeNd.h.

References my_dims.

Referenced by blocked_nd_range_impl(), and blocked_nd_range_impl().

Here is the caller graph for this function:

◆ empty()

bool tbb::detail::d1::empty ( ) const

True if at least one dimension is empty.

Definition at line 269 of file blocked_rangeNd.h.

References my_dims.

◆ is_divisible()

bool tbb::detail::d1::is_divisible ( ) const

True if at least one dimension is divisible.

Definition at line 276 of file blocked_rangeNd.h.

References my_dims.

◆ ndims()

static constexpr unsigned int tbb::detail::d1::ndims ( )
staticconstexpr

Dimensionality of a range.

Definition at line 255 of file blocked_rangeNd.h.

References N.

Variable Documentation

◆ my_dims

std::vector<tbb::blocked_range<value_type> > tbb::detail::d1::my_dims
private

Ranges in each dimension.

This has to be a vector, as there are situations where we can't initialise the entries all in one go.

Definition at line 300 of file blocked_rangeNd.h.

Referenced by blocked_nd_range_impl(), blocked_nd_range_impl(), blocked_nd_range_impl(), dim(), do_split(), empty(), and is_divisible().

◆ N

tbb::detail::d1::N