From 36b19f38514ab7353f9b37cbac6398e147cdd600 Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Fri, 3 Oct 2025 17:56:27 +0300 Subject: [PATCH 01/15] Add deduction guides for blocked_nd_range --- .../blocked_ranges/blocked_nd_range_cls.rst | 57 ++++++++++++++++++- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index f44010341f..b32adcf0b5 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2024 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2025 Intel Corporation .. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project. .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -45,8 +45,20 @@ For example, ``blocked_nd_range`` is analogous but not identical to ``blo // Access bool is_divisible() const; const dim_range_type& dim(unsigned int dimension) const; - }; + }; // class blocked_nd_range + // Deduction Guides + template + blocked_nd_range(blocked_range, blocked_range...) + -> blocked_nd_range; + + template + blocked_nd_range(/*a set of braced-init-lists of Value objects*/) + -> blocked_nd_range; + + template + blocked_nd_range(const Value (&)[N], typename blocked_nd_range::size_type = 1) + -> blocked_nd_range; } // namespace tbb } // namespace oneapi @@ -171,9 +183,48 @@ Other dimensions and the grain sizes for each subrange remain the same as in the **Returns:** ``blocked_range`` containing the value space along the dimension specified by the argument. +Deduction Guides +---------------- + +.. code:: cpp + + template + blocked_nd_range(blocked_range, blocked_range...) + -> blocked_nd_range; + +**Effects:**: Enables deduction when a set of ``blocked_range`` objects is passed to the ``blocked_nd_range`` constructor. + +**Constraints:**: Participates in overload resolution only if all of the types in ``Values`` are same as ``Value``. + +.. code:: cpp + + template + blocked_nd_range(/*a set of braced-init-lists of Value objects*/) + -> blocked_nd_range; + +**Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as braced-init-lists to the ``blocked_nd_range`` constructor. + +The exact signature of this deduction guide is unspecified. + +**Constraints:**: Participates in overload resolution only if the number of braced-init-lists provided is more than ``1`` and each list contains +``2`` or ``3`` elements of the same type, corresponding to ``blocked_range`` constructors with 2 and 3 arguments, respectively. + +**Example:**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. + + +.. code:: cpp + + template + blocked_nd_range(const Value (&)[N], typename blocked_nd_range::size_type = 1) + -> blocked_nd_range; + +**Effects:**: Enables deduction from a single C array object indicating a set of dimension sizes. + +In addition to the explicit deduction guides above, the implementation shall provide implicit or explicit deduction guides for copy constructor, +move constructor and constructors taking ``split`` and ``proportional_split`` arguments. + See also: * :doc:`blocked_range ` * :doc:`blocked_range2d ` * :doc:`blocked_range3d ` - From f996b675a8783ade7e10699fc0f25eddeae172e2 Mon Sep 17 00:00:00 2001 From: Konstantin Boyarinov Date: Wed, 22 Oct 2025 16:36:47 +0300 Subject: [PATCH 02/15] Apply suggestion from @rarutyun Co-authored-by: Ruslan Arutyunyan --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index b32adcf0b5..b65f998a98 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -209,7 +209,7 @@ The exact signature of this deduction guide is unspecified. **Constraints:**: Participates in overload resolution only if the number of braced-init-lists provided is more than ``1`` and each list contains ``2`` or ``3`` elements of the same type, corresponding to ``blocked_range`` constructors with 2 and 3 arguments, respectively. -**Example:**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. +**Example:**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. .. code:: cpp From 7251c72b26a6fa881c125c7d387d3598c2ca6738 Mon Sep 17 00:00:00 2001 From: Konstantin Boyarinov Date: Wed, 22 Oct 2025 16:36:53 +0300 Subject: [PATCH 03/15] Apply suggestion from @rarutyun Co-authored-by: Ruslan Arutyunyan --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index b65f998a98..54e0c877df 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -207,7 +207,7 @@ Deduction Guides The exact signature of this deduction guide is unspecified. **Constraints:**: Participates in overload resolution only if the number of braced-init-lists provided is more than ``1`` and each list contains -``2`` or ``3`` elements of the same type, corresponding to ``blocked_range`` constructors with 2 and 3 arguments, respectively. +``2`` or ``3`` elements of the same type. **Example:**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. From de5cbbff53aae8212789a0434541d6ab8161e24d Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Wed, 29 Oct 2025 17:25:54 +0200 Subject: [PATCH 04/15] Specify both initilizer_list and C-array options for braced-init-list guide --- .../blocked_ranges/blocked_nd_range_cls.rst | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index b32adcf0b5..1f09ecb059 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -52,13 +52,13 @@ For example, ``blocked_nd_range`` is analogous but not identical to ``blo blocked_nd_range(blocked_range, blocked_range...) -> blocked_nd_range; - template - blocked_nd_range(/*a set of braced-init-lists of Value objects*/) - -> blocked_nd_range; - template blocked_nd_range(const Value (&)[N], typename blocked_nd_range::size_type = 1) -> blocked_nd_range; + + template + blocked_nd_range(/*see-below*/) + -> blocked_nd_range; } // namespace tbb } // namespace oneapi @@ -198,27 +198,41 @@ Deduction Guides .. code:: cpp - template - blocked_nd_range(/*a set of braced-init-lists of Value objects*/) - -> blocked_nd_range; + template + blocked_nd_range(const Value (&)[N], typename blocked_nd_range::size_type = 1) + -> blocked_nd_range; + +**Effects:**: Enables deduction from a single C array object indicating a set of dimension sizes. + +.. code:: cpp + + template + blocked_nd_range(/*see-below*/) + -> blocked_nd_range(/*see-below*/); **Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as braced-init-lists to the ``blocked_nd_range`` constructor. -The exact signature of this deduction guide is unspecified. +**Example**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. -**Constraints:**: Participates in overload resolution only if the number of braced-init-lists provided is more than ``1`` and each list contains -``2`` or ``3`` elements of the same type, corresponding to ``blocked_range`` constructors with 2 and 3 arguments, respectively. +This deduction guide should have one of the signatures below: -**Example:**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. + .. code:: cpp + template + blocked_nd_range(std::initializer_list, std::initializer_list...) + -> blocked_nd_range; -.. code:: cpp + **Constraints:** Participates in overload resolution only if ``sizeof...(Values) > 0`` and all types in ``Values`` are the same as ``Value``. - template - blocked_nd_range(const Value (&)[N], typename blocked_nd_range::size_type = 1) - -> blocked_nd_range; + or -**Effects:**: Enables deduction from a single C array object indicating a set of dimension sizes. + .. code:: cpp + + template + blocked_nd_range(const Value (&... dim)[Ns]) + -> blocked_nd_range; + + **Constraints:** Participates in overload resolution only if ``sizeof...(Ns) > 1`` and ``N == 2`` or ``N == 3`` for each ``N`` in ``Ns``. In addition to the explicit deduction guides above, the implementation shall provide implicit or explicit deduction guides for copy constructor, move constructor and constructors taking ``split`` and ``proportional_split`` arguments. From c85d90bf29007e8b963f6fa0d92a35d55f46aa64 Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Thu, 30 Oct 2025 13:48:28 +0200 Subject: [PATCH 05/15] Change synopsis of the deduction guide --- .../blocked_ranges/blocked_nd_range_cls.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 1f09ecb059..29a2747b22 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -56,9 +56,9 @@ For example, ``blocked_nd_range`` is analogous but not identical to ``blo blocked_nd_range(const Value (&)[N], typename blocked_nd_range::size_type = 1) -> blocked_nd_range; - template - blocked_nd_range(/*see-below*/) - -> blocked_nd_range; + template + blocked_nd_range(/*a type deducible from a braced-enclosed initializer list*/) + -> blocked_nd_range; // see below } // namespace tbb } // namespace oneapi @@ -206,11 +206,11 @@ Deduction Guides .. code:: cpp - template - blocked_nd_range(/*see-below*/) - -> blocked_nd_range(/*see-below*/); + template + blocked_nd_range(/*a type deducible from a braced-enclosed initializer list*/) + -> blocked_nd_range; -**Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as braced-init-lists to the ``blocked_nd_range`` constructor. +**Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as brace-enclosed initializer lists to the ``blocked_nd_range`` constructor. **Example**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. From bbc35c3e9517ac05a4d61136ca842d791068904b Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Thu, 30 Oct 2025 14:07:18 +0200 Subject: [PATCH 06/15] Minor fix --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 29a2747b22..9e96191eae 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -57,7 +57,7 @@ For example, ``blocked_nd_range`` is analogous but not identical to ``blo -> blocked_nd_range; template - blocked_nd_range(/*a type deducible from a braced-enclosed initializer list*/) + blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/) -> blocked_nd_range; // see below } // namespace tbb } // namespace oneapi @@ -207,7 +207,7 @@ Deduction Guides .. code:: cpp template - blocked_nd_range(/*a type deducible from a braced-enclosed initializer list*/) + blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/) -> blocked_nd_range; **Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as brace-enclosed initializer lists to the ``blocked_nd_range`` constructor. From eec1fecb596e042d1bf0b8c8122bc9dd0911ba9d Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Fri, 31 Oct 2025 15:56:59 +0200 Subject: [PATCH 07/15] Fix deduction guide synopsis --- .../algorithms/blocked_ranges/blocked_nd_range_cls.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 9e96191eae..90b8d61ffc 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -57,8 +57,8 @@ For example, ``blocked_nd_range`` is analogous but not identical to ``blo -> blocked_nd_range; template - blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/) - -> blocked_nd_range; // see below + blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/... args) + -> blocked_nd_range; // see below } // namespace tbb } // namespace oneapi @@ -207,8 +207,8 @@ Deduction Guides .. code:: cpp template - blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/) - -> blocked_nd_range; + blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/... args) + -> blocked_nd_range; **Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as brace-enclosed initializer lists to the ``blocked_nd_range`` constructor. @@ -224,7 +224,7 @@ This deduction guide should have one of the signatures below: **Constraints:** Participates in overload resolution only if ``sizeof...(Values) > 0`` and all types in ``Values`` are the same as ``Value``. - or +or .. code:: cpp From 85020ad50b0e352dea71f2c5fe626281c2ddf14f Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Fri, 31 Oct 2025 16:03:03 +0200 Subject: [PATCH 08/15] Minor formatting fix --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 90b8d61ffc..3c1406e89f 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -212,7 +212,7 @@ Deduction Guides **Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as brace-enclosed initializer lists to the ``blocked_nd_range`` constructor. -**Example**: ``blocked_nd_range range({0, 100}, {0, 100, 50})`` should deduce ``range`` as ``blocked_nd_range``. +**Example**: ``blocked_nd_range range({0, 10}, {0, 10, 5})`` should deduce ``range`` as ``blocked_nd_range``. This deduction guide should have one of the signatures below: From 7b78d8d811239966e3ca04f3cae584bd6e1a9ca2 Mon Sep 17 00:00:00 2001 From: Konstantin Boyarinov Date: Fri, 31 Oct 2025 16:54:53 +0200 Subject: [PATCH 09/15] Update source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst Co-authored-by: Alexey Kukanov --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 3c1406e89f..9007063dbc 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -59,6 +59,7 @@ For example, ``blocked_nd_range`` is analogous but not identical to ``blo template blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/... args) -> blocked_nd_range; // see below + } // namespace tbb } // namespace oneapi From 46ee765694704bc4c6a63370e5195ef0152ecd16 Mon Sep 17 00:00:00 2001 From: Konstantin Boyarinov Date: Fri, 31 Oct 2025 16:55:07 +0200 Subject: [PATCH 10/15] Update source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst Co-authored-by: Alexey Kukanov --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 9007063dbc..37781d6acd 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -57,7 +57,7 @@ For example, ``blocked_nd_range`` is analogous but not identical to ``blo -> blocked_nd_range; template - blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/... args) + blocked_nd_range(/*a type deducible from a braced initialization list of Value objects*/... args) -> blocked_nd_range; // see below } // namespace tbb From 93c14c40e621fc643fc211e92fd93d6a0cb4c8b8 Mon Sep 17 00:00:00 2001 From: Konstantin Boyarinov Date: Fri, 31 Oct 2025 16:55:27 +0200 Subject: [PATCH 11/15] Update source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst Co-authored-by: Alexey Kukanov --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 37781d6acd..454b689a3d 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -208,7 +208,7 @@ Deduction Guides .. code:: cpp template - blocked_nd_range(/*a type deducible from a braced-enclosed initializer list of Value objects*/... args) + blocked_nd_range(/*a type deducible from a braced initialization list of Value objects*/... args) -> blocked_nd_range; **Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as brace-enclosed initializer lists to the ``blocked_nd_range`` constructor. From 2f0622c0206a7f90ae3c2441b3ef8292d77300db Mon Sep 17 00:00:00 2001 From: Konstantin Boyarinov Date: Fri, 31 Oct 2025 16:55:38 +0200 Subject: [PATCH 12/15] Update source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst Co-authored-by: Alexey Kukanov --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 454b689a3d..870c950b8e 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -211,7 +211,7 @@ Deduction Guides blocked_nd_range(/*a type deducible from a braced initialization list of Value objects*/... args) -> blocked_nd_range; -**Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as brace-enclosed initializer lists to the ``blocked_nd_range`` constructor. +**Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as braced initialization lists to the ``blocked_nd_range`` constructor. **Example**: ``blocked_nd_range range({0, 10}, {0, 10, 5})`` should deduce ``range`` as ``blocked_nd_range``. From 725d83d11f431e2efce65cf785547e724935f2bc Mon Sep 17 00:00:00 2001 From: Konstantin Boyarinov Date: Fri, 31 Oct 2025 16:55:53 +0200 Subject: [PATCH 13/15] Update source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst Co-authored-by: Alexey Kukanov --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 870c950b8e..e351c1ea29 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -215,7 +215,7 @@ Deduction Guides **Example**: ``blocked_nd_range range({0, 10}, {0, 10, 5})`` should deduce ``range`` as ``blocked_nd_range``. -This deduction guide should have one of the signatures below: +This deduction guide should be implemented as one of the following alternatives: .. code:: cpp From c37f6d5a5572fe48017b701ed651abb18b9ccf91 Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Fri, 31 Oct 2025 17:11:10 +0200 Subject: [PATCH 14/15] Add note about the single brace init list --- .../source/algorithms/blocked_ranges/blocked_nd_range_cls.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index e351c1ea29..8e0c5de199 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -238,6 +238,10 @@ or In addition to the explicit deduction guides above, the implementation shall provide implicit or explicit deduction guides for copy constructor, move constructor and constructors taking ``split`` and ``proportional_split`` arguments. +.. note:: + + If a single braced initialization list is provided, it is interpreted as a C array of dimension sizes, not as a ``blocked_range``. + See also: * :doc:`blocked_range ` From bda77cd36349e5a128eb9902773eb8f1a09cee21 Mon Sep 17 00:00:00 2001 From: "Boyarinov, Konstantin" Date: Fri, 31 Oct 2025 19:02:44 +0200 Subject: [PATCH 15/15] Move the note up --- .../algorithms/blocked_ranges/blocked_nd_range_cls.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst index 8e0c5de199..45afce3d94 100644 --- a/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst +++ b/source/elements/oneTBB/source/algorithms/blocked_ranges/blocked_nd_range_cls.rst @@ -213,6 +213,10 @@ Deduction Guides **Effects:**: Enables deduction when a set of ``blocked_range`` objects is provided as braced initialization lists to the ``blocked_nd_range`` constructor. +.. note:: + + If a single braced initialization list is provided, it is interpreted as a C array of dimension sizes, not as a ``blocked_range``. + **Example**: ``blocked_nd_range range({0, 10}, {0, 10, 5})`` should deduce ``range`` as ``blocked_nd_range``. This deduction guide should be implemented as one of the following alternatives: @@ -238,10 +242,6 @@ or In addition to the explicit deduction guides above, the implementation shall provide implicit or explicit deduction guides for copy constructor, move constructor and constructors taking ``split`` and ``proportional_split`` arguments. -.. note:: - - If a single braced initialization list is provided, it is interpreted as a C array of dimension sizes, not as a ``blocked_range``. - See also: * :doc:`blocked_range `