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 ` -