Skip to content

Commit c569c13

Browse files
authored
Merge pull request #151 from hsbadr/develop
Intel TBB 2019 Update 8
2 parents 3525d91 + 26cbda9 commit c569c13

File tree

707 files changed

+94147
-9223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

707 files changed

+94147
-9223
lines changed

inst/include/tbb_local/serial/tbb/parallel_for.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2018 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

2117
#ifndef __TBB_SERIAL_parallel_for_H

inst/include/tbb_local/serial/tbb/tbb_annotate.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2018 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

2117
#ifndef __TBB_annotate_H

inst/include/tbb_local/tbb/aggregator.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2017 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

2117
#ifndef __TBB__aggregator_H

inst/include/tbb_local/tbb/aligned_space.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2017 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

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

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

4541
} // namespace tbb

inst/include/tbb_local/tbb/atomic.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2017 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

2117
#ifndef __TBB_atomic_H

inst/include/tbb_local/tbb/blocked_range.h

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2017 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

2117
#ifndef __TBB_blocked_range_H
@@ -25,6 +21,15 @@
2521

2622
namespace tbb {
2723

24+
namespace internal {
25+
26+
// blocked_rangeNd_impl forward declaration in tbb::internal namespace to
27+
// name it as a friend for a tbb::blocked_range.
28+
template<typename Value, unsigned int N, typename>
29+
class blocked_rangeNd_impl;
30+
31+
} // namespace internal
32+
2833
/** \page range_req Requirements on range concept
2934
Class \c R implementing the concept of range must define:
3035
- \code R::R( const R& ); \endcode Copy constructor
@@ -47,9 +52,11 @@ class blocked_range {
4752
//! Type for size of a range
4853
typedef std::size_t size_type;
4954

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

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

117124
private:
118-
/** NOTE: my_end MUST be declared before my_begin, otherwise the forking constructor will break. */
125+
/** NOTE: my_end MUST be declared before my_begin, otherwise the splitting constructor will break. */
119126
Value my_end;
120127
Value my_begin;
121128
size_type my_grainsize;
122129

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

153159
template<typename RowValue, typename ColValue, typename PageValue>
154160
friend class blocked_range3d;
161+
162+
template<typename DimValue, unsigned int N, typename>
163+
friend class internal::blocked_rangeNd_impl;
155164
};
156165

157166
} // namespace tbb

inst/include/tbb_local/tbb/blocked_range2d.h

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2017 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

2117
#ifndef __TBB_blocked_range2d_H
@@ -45,19 +41,17 @@ class blocked_range2d {
4541
ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) :
4642
my_rows(row_begin,row_end,row_grainsize),
4743
my_cols(col_begin,col_end,col_grainsize)
48-
{
49-
}
44+
{}
5045

5146
blocked_range2d( RowValue row_begin, RowValue row_end,
5247
ColValue col_begin, ColValue col_end ) :
5348
my_rows(row_begin,row_end),
5449
my_cols(col_begin,col_end)
55-
{
56-
}
50+
{}
5751

5852
//! True if range is empty
5953
bool empty() const {
60-
// Yes, it is a logical OR here, not AND.
54+
// Range is empty if at least one dimension is empty.
6155
return my_rows.empty() || my_cols.empty();
6256
}
6357

@@ -86,6 +80,14 @@ class blocked_range2d {
8680
}
8781
#endif /* __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES */
8882

83+
//! The rows of the iteration space
84+
const row_range_type& rows() const {return my_rows;}
85+
86+
//! The columns of the iteration space
87+
const col_range_type& cols() const {return my_cols;}
88+
89+
private:
90+
8991
template <typename Split>
9092
void do_split( blocked_range2d& r, Split& split_obj )
9193
{
@@ -95,12 +97,6 @@ class blocked_range2d {
9597
my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);
9698
}
9799
}
98-
99-
//! The rows of the iteration space
100-
const row_range_type& rows() const {return my_rows;}
101-
102-
//! The columns of the iteration space
103-
const col_range_type& cols() const {return my_cols;}
104100
};
105101

106102
} // namespace tbb

inst/include/tbb_local/tbb/blocked_range3d.h

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2017 Intel Corporation
2+
Copyright (c) 2005-2019 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -12,10 +12,6 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
16-
17-
18-
1915
*/
2016

2117
#ifndef __TBB_blocked_range3d_H
@@ -49,21 +45,19 @@ class blocked_range3d {
4945
my_pages(page_begin,page_end),
5046
my_rows(row_begin,row_end),
5147
my_cols(col_begin,col_end)
52-
{
53-
}
48+
{}
5449

5550
blocked_range3d( PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize,
5651
RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize,
5752
ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) :
5853
my_pages(page_begin,page_end,page_grainsize),
5954
my_rows(row_begin,row_end,row_grainsize),
6055
my_cols(col_begin,col_end,col_grainsize)
61-
{
62-
}
56+
{}
6357

6458
//! True if range is empty
6559
bool empty() const {
66-
// Yes, it is a logical OR here, not AND.
60+
// Range is empty if at least one dimension is empty.
6761
return my_pages.empty() || my_rows.empty() || my_cols.empty();
6862
}
6963

@@ -94,6 +88,17 @@ class blocked_range3d {
9488
}
9589
#endif /* __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES */
9690

91+
//! The pages of the iteration space
92+
const page_range_type& pages() const {return my_pages;}
93+
94+
//! The rows of the iteration space
95+
const row_range_type& rows() const {return my_rows;}
96+
97+
//! The columns of the iteration space
98+
const col_range_type& cols() const {return my_cols;}
99+
100+
private:
101+
97102
template <typename Split>
98103
void do_split( blocked_range3d& r, Split& split_obj)
99104
{
@@ -103,24 +108,14 @@ class blocked_range3d {
103108
} else {
104109
my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);
105110
}
106-
} else {
111+
} else {
107112
if ( my_pages.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_pages.grainsize()) ) {
108113
my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);
109114
} else {
110115
my_pages.my_begin = page_range_type::do_split(r.my_pages, split_obj);
111116
}
112117
}
113118
}
114-
115-
//! The pages of the iteration space
116-
const page_range_type& pages() const {return my_pages;}
117-
118-
//! The rows of the iteration space
119-
const row_range_type& rows() const {return my_rows;}
120-
121-
//! The columns of the iteration space
122-
const col_range_type& cols() const {return my_cols;}
123-
124119
};
125120

126121
} // namespace tbb

0 commit comments

Comments
 (0)