Skip to content

Commit

Permalink
Enable CTAD for blocked_rangeNd since C++17 (#1524)
Browse files Browse the repository at this point in the history
Co-authored-by: Boyarinov, Konstantin <[email protected]>
  • Loading branch information
rarutyun and kboyarinov authored Jan 14, 2025
1 parent edad47b commit b1c534b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 7 additions & 4 deletions include/oneapi/tbb/blocked_nd_range.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2017-2024 Intel Corporation
Copyright (c) 2017-2025 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 Down Expand Up @@ -47,11 +47,9 @@ namespace d1 {
*/

template<typename Value, unsigned int N, typename = detail::make_index_sequence<N>>
__TBB_requires(blocked_range_value<Value>)
class blocked_nd_range_impl;

template<typename Value, unsigned int N, std::size_t... Is>
__TBB_requires(blocked_range_value<Value>)
class blocked_nd_range_impl<Value, N, detail::index_sequence<Is...>> {
public:
//! Type of a value.
Expand Down Expand Up @@ -142,7 +140,12 @@ class blocked_nd_range_impl<Value, N, detail::index_sequence<Is...>> {
};

template<typename Value, unsigned int N>
using blocked_nd_range = blocked_nd_range_impl<Value, N>;
__TBB_requires(blocked_range_value<Value>)
class blocked_nd_range : public blocked_nd_range_impl<Value, N> {
using base = blocked_nd_range_impl<Value, N>;
// Making constructors of base class visible
using base::base;
};

} // namespace d1
} // namespace detail
Expand Down
3 changes: 1 addition & 2 deletions include/oneapi/tbb/blocked_range.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2024 Intel Corporation
Copyright (c) 2005-2025 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 Down Expand Up @@ -151,7 +151,6 @@ class blocked_range {
friend class blocked_range3d;

template<typename DimValue, unsigned int N, typename>
__TBB_requires(blocked_range_value<DimValue>)
friend class blocked_nd_range_impl;
};

Expand Down

0 comments on commit b1c534b

Please sign in to comment.