Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CTAD for blocked_rangeNd since C++17 #1524

Merged
merged 4 commits into from
Jan 14, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading