Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 1 addition & 5 deletions inst/include/tbb_local/serial/tbb/parallel_for.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2018 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB_SERIAL_parallel_for_H
Expand Down
6 changes: 1 addition & 5 deletions inst/include/tbb_local/serial/tbb/tbb_annotate.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2018 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB_annotate_H
Expand Down
6 changes: 1 addition & 5 deletions inst/include/tbb_local/tbb/aggregator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2017 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB__aggregator_H
Expand Down
10 changes: 3 additions & 7 deletions inst/include/tbb_local/tbb/aligned_space.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2017 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB_aligned_space_H
Expand All @@ -36,10 +32,10 @@ class aligned_space {
element_type array[(sizeof(T)*N+sizeof(element_type)-1)/sizeof(element_type)];
public:
//! Pointer to beginning of array
T* begin() {return internal::punned_cast<T*>(this);}
T* begin() const {return internal::punned_cast<T*>(this);}

//! Pointer to one past last element in array.
T* end() {return begin()+N;}
T* end() const {return begin()+N;}
};

} // namespace tbb
Expand Down
6 changes: 1 addition & 5 deletions inst/include/tbb_local/tbb/atomic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2017 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB_atomic_H
Expand Down
29 changes: 19 additions & 10 deletions inst/include/tbb_local/tbb/blocked_range.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2017 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB_blocked_range_H
Expand All @@ -25,6 +21,15 @@

namespace tbb {

namespace internal {

// blocked_rangeNd_impl forward declaration in tbb::internal namespace to
// name it as a friend for a tbb::blocked_range.
template<typename Value, unsigned int N, typename>
class blocked_rangeNd_impl;

} // namespace internal

/** \page range_req Requirements on range concept
Class \c R implementing the concept of range must define:
- \code R::R( const R& ); \endcode Copy constructor
Expand All @@ -47,9 +52,11 @@ class blocked_range {
//! Type for size of a range
typedef std::size_t size_type;

//! Construct range with default-constructed values for begin and end.
#if __TBB_DEPRECATED_BLOCKED_RANGE_DEFAULT_CTOR
//! Construct range with default-constructed values for begin, end, and grainsize.
/** Requires that Value have a default constructor. */
blocked_range() : my_end(), my_begin() {}
blocked_range() : my_end(), my_begin(), my_grainsize() {}
#endif

//! Construct range over half-open interval [begin,end), with the given grainsize.
blocked_range( Value begin_, Value end_, size_type grainsize_=1 ) :
Expand Down Expand Up @@ -115,13 +122,12 @@ class blocked_range {
#endif /* __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES */

private:
/** NOTE: my_end MUST be declared before my_begin, otherwise the forking constructor will break. */
/** NOTE: my_end MUST be declared before my_begin, otherwise the splitting constructor will break. */
Value my_end;
Value my_begin;
size_type my_grainsize;

//! Auxiliary function used by forking constructor.
/** Using this function lets us not require that Value support assignment or default construction. */
//! Auxiliary function used by the splitting constructor.
static Value do_split( blocked_range& r, split )
{
__TBB_ASSERT( r.is_divisible(), "cannot split blocked_range that is not divisible" );
Expand Down Expand Up @@ -152,6 +158,9 @@ class blocked_range {

template<typename RowValue, typename ColValue, typename PageValue>
friend class blocked_range3d;

template<typename DimValue, unsigned int N, typename>
friend class internal::blocked_rangeNd_impl;
};

} // namespace tbb
Expand Down
28 changes: 12 additions & 16 deletions inst/include/tbb_local/tbb/blocked_range2d.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2017 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB_blocked_range2d_H
Expand Down Expand Up @@ -45,19 +41,17 @@ class blocked_range2d {
ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) :
my_rows(row_begin,row_end,row_grainsize),
my_cols(col_begin,col_end,col_grainsize)
{
}
{}

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

//! True if range is empty
bool empty() const {
// Yes, it is a logical OR here, not AND.
// Range is empty if at least one dimension is empty.
return my_rows.empty() || my_cols.empty();
}

Expand Down Expand Up @@ -86,6 +80,14 @@ class blocked_range2d {
}
#endif /* __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES */

//! The rows of the iteration space
const row_range_type& rows() const {return my_rows;}

//! The columns of the iteration space
const col_range_type& cols() const {return my_cols;}

private:

template <typename Split>
void do_split( blocked_range2d& r, Split& split_obj )
{
Expand All @@ -95,12 +97,6 @@ class blocked_range2d {
my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);
}
}

//! The rows of the iteration space
const row_range_type& rows() const {return my_rows;}

//! The columns of the iteration space
const col_range_type& cols() const {return my_cols;}
};

} // namespace tbb
Expand Down
37 changes: 16 additions & 21 deletions inst/include/tbb_local/tbb/blocked_range3d.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2017 Intel Corporation
Copyright (c) 2005-2019 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.




*/

#ifndef __TBB_blocked_range3d_H
Expand Down Expand Up @@ -49,21 +45,19 @@ class blocked_range3d {
my_pages(page_begin,page_end),
my_rows(row_begin,row_end),
my_cols(col_begin,col_end)
{
}
{}

blocked_range3d( PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize,
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 ) :
my_pages(page_begin,page_end,page_grainsize),
my_rows(row_begin,row_end,row_grainsize),
my_cols(col_begin,col_end,col_grainsize)
{
}
{}

//! True if range is empty
bool empty() const {
// Yes, it is a logical OR here, not AND.
// Range is empty if at least one dimension is empty.
return my_pages.empty() || my_rows.empty() || my_cols.empty();
}

Expand Down Expand Up @@ -94,6 +88,17 @@ class blocked_range3d {
}
#endif /* __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES */

//! The pages of the iteration space
const page_range_type& pages() const {return my_pages;}

//! The rows of the iteration space
const row_range_type& rows() const {return my_rows;}

//! The columns of the iteration space
const col_range_type& cols() const {return my_cols;}

private:

template <typename Split>
void do_split( blocked_range3d& r, Split& split_obj)
{
Expand All @@ -103,24 +108,14 @@ class blocked_range3d {
} else {
my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);
}
} else {
} else {
if ( my_pages.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_pages.grainsize()) ) {
my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);
} else {
my_pages.my_begin = page_range_type::do_split(r.my_pages, split_obj);
}
}
}

//! The pages of the iteration space
const page_range_type& pages() const {return my_pages;}

//! The rows of the iteration space
const row_range_type& rows() const {return my_rows;}

//! The columns of the iteration space
const col_range_type& cols() const {return my_cols;}

};

} // namespace tbb
Expand Down
Loading