Skip to content
Open
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
2 changes: 1 addition & 1 deletion docs/source/API/alphabetical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Core
+--------------------------------------------------------------------------------------+---------------------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| `initialize <core/initialize_finalize/initialize.html>`_ | `Core <core-index.html>`_ | `Initialization and Finalization <core/Initialize-and-Finalize.html>`_ | function to initialize Kokkos |
+--------------------------------------------------------------------------------------+---------------------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| `is_array_layout <core/Traits.html#is-array-layout>`_ | `Core <core-index.html>`_ | `Traits <core/Traits.html>`_ | Trait to detect types that model the Layout concept |
| `is_layout_type <core/Traits.html#is-layout-type>`_ | `Core <core-index.html>`_ | `Traits <core/Traits.html>`_ | Trait to detect types that model the Layout concept |
+--------------------------------------------------------------------------------------+---------------------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| `is_execution_policy <core/Traits.html#is-execution-policy>`_ | `Core <core-index.html>`_ | `Traits <core/Traits.html>`_ | Trait to detect types that model ExecutionPolicy concept |
+--------------------------------------------------------------------------------------+---------------------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
Expand Down
12 changes: 6 additions & 6 deletions docs/source/API/containers/DualView.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,31 +84,31 @@ Description

The type of a const View host mirror of ``t_dev_const``.

.. cpp:type:: View<typename traits::const_data_type, typename traits::array_layout, typename traits::device_type, Kokkos::MemoryTraits<Kokkos::RandomAccess> > t_dev_const_randomread
.. cpp:type:: View<typename traits::const_data_type, typename traits::layout_type, typename traits::device_type, Kokkos::MemoryTraits<Kokkos::RandomAccess> > t_dev_const_randomread

The type of a const, random-access View on the device.

.. cpp:type:: typename t_dev_const_randomread::HostMirror t_host_const_randomread

The type of a const, random-access View host mirror of ``t_dev_const_randomread``.

.. cpp:type:: View<typename traits::data_type, typename traits::array_layout, typename traits::device_type, MemoryUnmanaged> t_dev_um
.. cpp:type:: View<typename traits::data_type, typename traits::layout_type, typename traits::device_type, MemoryUnmanaged> t_dev_um

The type of an unmanaged View on the device.

.. cpp:type:: View<typename t_host::data_type, typename t_host::array_layout, typename t_host::device_type, MemoryUnmanaged> t_host_um
.. cpp:type:: View<typename t_host::data_type, typename t_host::layout_type, typename t_host::device_type, MemoryUnmanaged> t_host_um

The type of an unmanaged View host mirror of \\c t_dev_um.

.. cpp:type:: View<typename traits::const_data_type, typename traits::array_layout, typename traits::device_type, MemoryUnmanaged> t_dev_const_um
.. cpp:type:: View<typename traits::const_data_type, typename traits::layout_type, typename traits::device_type, MemoryUnmanaged> t_dev_const_um

The type of a const unmanaged View on the device.

.. cpp:type:: View<typename t_host::const_data_type, typename t_host::array_layout, typename t_host::device_type, MemoryUnmanaged> t_host_const_um
.. cpp:type:: View<typename t_host::const_data_type, typename t_host::layout_type, typename t_host::device_type, MemoryUnmanaged> t_host_const_um

The type of a const unmanaged View host mirror of \\c t_dev_const_um.

.. cpp:type:: View<typename t_host::const_data_type, typename t_host::array_layout, typename t_host::device_type, Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess> > t_dev_const_randomread_um
.. cpp:type:: View<typename t_host::const_data_type, typename t_host::layout_type, typename t_host::device_type, Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess> > t_dev_const_randomread_um

The type of a const, random-access View on the device.

Expand Down
34 changes: 19 additions & 15 deletions docs/source/API/containers/DynRankView.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ Description

.. cpp:type:: array_layout

The layout of the ``DynRankView``. (Deprecated since Kokkos 5.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The layout of the ``DynRankView``. (Deprecated since Kokkos 5.0)
The layout of the ``DynRankView``. (Deprecated since Kokkos 5.0: use ``layout_type``)


.. cpp:type:: layout_type

The layout of the ``DynRankView``.

.. cpp:type:: size_type
Expand Down Expand Up @@ -202,14 +206,14 @@ Description

.. cpp:function:: DynRankView(const std::string& name, const IntType& ... indices)

Requires: ``array_layout::is_regular == true``
Requires: ``layout_type::is_regular == true``

Standard allocating constructor.

* ``name``: a user provided label, which is used for profiling and debugging purposes. Names are not required to be unique.
* ``indices``: runtime dimensions of the view.

.. cpp:function:: DynRankView(const std::string& name, const array_layout& layout)
.. cpp:function:: DynRankView(const std::string& name, const layout_type& layout)

Standard allocating constructor.

Expand All @@ -218,28 +222,28 @@ Description

.. cpp:function:: DynRankView(const AllocProperties& prop, const IntType& ... indices)

Requires: ``array_layout::is_regular == true``
Requires: ``layout_type::is_regular == true``

Allocating constructor with allocation properties. An allocation properties object is returned by the ``view_alloc`` function.

* ``indices``: runtime dimensions of the view.

.. cpp:function:: DynRankView(const AllocProperties& prop, const array_layout& layout)
.. cpp:function:: DynRankView(const AllocProperties& prop, const layout_type& layout)

Allocating constructor with allocation properties and a layout object.

* ``layout``: an instance of a layout class.

.. cpp:function:: DynRankView(const pointer_type& ptr, const IntType& ... indices)

Requires: ``array_layout::is_regular == true``
Requires: ``layout_type::is_regular == true``

Unmanaged data wrapping constructor.

* ``ptr``: pointer to a user provided memory allocation. Must provide storage of size ``DynRankView::required_allocation_size(n0,...,nR)``.
* ``indices``: runtime dimensions of the view.

.. cpp:function:: DynRankView(const pointer_type& ptr, const array_layout& layout)
.. cpp:function:: DynRankView(const pointer_type& ptr, const layout_type& layout)

Unmanaged data wrapper constructor.

Expand All @@ -248,14 +252,14 @@ Description

.. cpp:function:: DynRankView(const ScratchSpace& space, const IntType& ... indices)

Requires: ``sizeof(IntType...)==rank_dynamic()`` and ``array_layout::is_regular == true``
Requires: ``sizeof(IntType...)==rank_dynamic()`` and ``layout_type::is_regular == true``

Constructor which acquires memory from a Scratch Memory handle.

* ``space``: scratch memory handle. Typically returned from ``team_handles`` in ``TeamPolicy`` kernels.
* ``indices``: runtime dimensions of the view.

.. cpp:function:: DynRankView(const ScratchSpace& space, const array_layout& layout)
.. cpp:function:: DynRankView(const ScratchSpace& space, const layout_type& layout)

Constructor which acquires memory from a Scratch Memory handle.

Expand Down Expand Up @@ -285,7 +289,7 @@ Description

.. rubric:: Data Layout, Dimensions, Strides

.. cpp:function:: constexpr array_layout layout() const
.. cpp:function:: constexpr layout_type layout() const

Returns the layout object. Can be used to to construct other views with the same dimensions.

Expand Down Expand Up @@ -353,9 +357,9 @@ Description
size_t N2 = 0, size_t N3 = 0, size_t N4 = 0, \
size_t N5 = 0, size_t N6 = 0);

Returns the number of bytes necessary for an unmanaged view of the provided dimensions. This function is only valid if ``array_layout::is_regular == true``.
Returns the number of bytes necessary for an unmanaged view of the provided dimensions. This function is only valid if ``layout_type::is_regular == true``.

.. cpp:function:: static constexpr size_t required_allocation_size(const array_layout& layout);
.. cpp:function:: static constexpr size_t required_allocation_size(const layout_type& layout);

:return: the number of bytes necessary for an unmanaged view of the provided layout.

Expand Down Expand Up @@ -397,12 +401,12 @@ The following conditions must be met at and are evaluated at compile time:
* If ``std::is_const<SrcType::value_type>::value == true`` than ``std::is_const<DstType::value_type>::value == true``.
* ``MemorySpaceAccess<DstType::memory_space,SrcType::memory_space>::assignable == true``

Furthermore there are rules which must be met if ``DstType::array_layout`` is not the same as ``SrcType::array_layout``. These rules only cover cases where both layouts are one of ``LayoutLeft`` , ``LayoutRight`` or ``LayoutStride``
Furthermore there are rules which must be met if ``DstType::layout_type`` is not the same as ``SrcType::layout_type``. These rules only cover cases where both layouts are one of ``LayoutLeft`` , ``LayoutRight`` or ``LayoutStride``

* If neither ``DstType::array_layout`` nor ``SrcType::array_layout`` is ``LayoutStride``:
- If ``DstType::rank > 1`` than ``DstType::array_layout`` must be the same as ``SrcType::array_layout``.
* If neither ``DstType::layout_type`` nor ``SrcType::layout_type`` is ``LayoutStride``:
- If ``DstType::rank > 1`` than ``DstType::layout_type`` must be the same as ``SrcType::layout_type``.

* If either ``DstType::array_layout`` or ``SrcType::array_layout`` is ``LayoutStride``
* If either ``DstType::layout_type`` or ``SrcType::layout_type`` is ``LayoutStride``
- For each dimension ``k`` it must hold that ``dst_view.extent(k) == src_view.extent(k)``

Examples
Expand Down
4 changes: 2 additions & 2 deletions docs/source/API/core/KokkosConcepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ and ``OpenMPTarget``, the current state of the Kokkos |ExecutionSpaceTwo|_ conce
is_memory_space<typename Ex::memory_space>::value;
typename Ex::size_type;
std::is_integral_v<typename Ex::size_type>;
typename Ex::array_layout;
is_array_layout<typename Ex::array_layout>::value;
typename Ex::layout_type;
is_layout_type<typename Ex::layout_type>::value;
typename Ex::scratch_memory_space;
is_memory_space<typename Ex::scratch_memory_space>::value;
typename Ex::device_type;
Expand Down
6 changes: 6 additions & 0 deletions docs/source/API/core/Traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Traits
is_array_layout
---------------

Boolean type trait to detect types that model the Layout concept. (Deprecated since Kokkos 5.0)


is_layout_type
--------------

Boolean type trait to detect types that model the Layout concept.

is_execution_policy
Expand Down
9 changes: 6 additions & 3 deletions docs/source/API/core/execution_spaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ Additionally, the following type aliases (a.k.a. ``typedef`` s) will be defined

* ``Ex::memory_space``: the default |MemorySpace|_ to use when executing with ``Ex``. Kokkos guarantees that ``Kokkos::SpaceAccessibility<Ex, Ex::memory_space>::accessible`` will be ``true`` (see |KokkosSpaceAccessibility|_)

* ``Ex::array_layout``: the default ``ArrayLayout`` recommended for use with ``View`` types accessed from ``Ex``.
* ``Ex::array_layout``: the default ``ArrayLayout`` recommended for use with ``View`` types accessed from ``Ex``. //Deprecated since Kokkos 5.0

* ``Ex::layout_type``: the default ``LayoutType`` recommended for use with ``View`` types accessed from ``Ex``.

* ``Ex::scratch_memory_space``: the ``ScratchMemorySpace`` that parallel patterns will use for allocation of scratch memory (for instance, as requested by a |KokkosTeamPolicy|_). Only unmanaged Views can be created using this memory space.

Expand Down Expand Up @@ -268,7 +270,8 @@ Synopsis
typedef ... memory_space;
typedef Device<execution_space, memory_space> device_type;
typedef ... scratch_memory_space;
typedef ... array_layout;
typedef ... layout_type;
typedef ... array_layout; // Deprecated since Kokkos 5.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
typedef ... array_layout; // Deprecated since Kokkos 5.0
typedef ... array_layout; // Deprecated since Kokkos 5.0, use layout_type

typedef ... size_type;

ExecutionSpaceConcept();
Expand Down Expand Up @@ -305,7 +308,7 @@ Typedefs

* ``device_type``: ``DeviceType<execution_space,memory_space>``.

* ``array_layout``: The default ``ArrayLayout`` recommended for use with ``View`` types accessed from |ExecutionSpaceConcept|_.
* ``layout_type``: The default ``LayoutType`` recommended for use with ``View`` types accessed from |ExecutionSpaceConcept|_.

* ``scratch_memory_space``: The ``ScratchMemorySpace`` that parallel patterns will use for allocation of scratch memory (for instance, as requested by a |KokkosTeamPolicy|_). Only unmanaged Views can be created using this memory space.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/API/core/view/deep_copy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Requirements

- For all ``k`` in ``[0, dest.rank)`` ``dest.extent(k) == src.extent(k)`` (or the same as ``dest.rank()``)

- ``src.span_is_contiguous() && dest.span_is_contiguous() && std::is_same<ViewDest::array_layout,ViewSrc::array_layout>::value``, *or* there exists an `ExecutionSpace <../execution_spaces.html>`_ ``copy_space`` (either given or defaulted) such that both ``SpaceAccessibility<copy_space, ViewDest::memory_space>::accessible == true`` and ``SpaceAccessibility<copy_space,ViewSrc::memory_space>::accessible == true``.
- ``src.span_is_contiguous() && dest.span_is_contiguous() && std::is_same<ViewDest::layout_type,ViewSrc::layout_type>::value``, *or* there exists an `ExecutionSpace <../execution_spaces.html>`_ ``copy_space`` (either given or defaulted) such that both ``SpaceAccessibility<copy_space, ViewDest::memory_space>::accessible == true`` and ``SpaceAccessibility<copy_space,ViewSrc::memory_space>::accessible == true``.

* If ``src`` is a `Kokkos::View <view.html>`_ and ``dest`` is a scalar, then ``src.rank == 0`` is true.

Expand Down Expand Up @@ -138,7 +138,7 @@ How to get layout incompatible views copied
auto h_view_tmp = Kokkos::create_mirror_view(d_view);

// This inherits the Layout from d_view
static_assert(std::is_same<decltype(h_view_tmp)::array_layout,
static_assert(std::is_same<decltype(h_view_tmp)::layout_type,
Kokkos::LayoutLeft>::value);

// This now works since h_view_tmp and h_view are both accessible
Expand Down
4 changes: 4 additions & 0 deletions docs/source/API/core/view/layoutLeft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Description

.. cpp:type:: array_layout

A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0)
A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0: use ``layout_type``)


.. cpp:type:: layout_type

A tag signifying that this models the Layout concept.

.. rubric:: Member Variables
Expand Down
4 changes: 4 additions & 0 deletions docs/source/API/core/view/layoutRight.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Description

.. cpp:type:: array_layout

A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0)
A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0: use ``layout_type``)


.. cpp:type:: layout_type

A tag signifying that this models the Layout concept.

.. rubric:: Member Variables
Expand Down
6 changes: 5 additions & 1 deletion docs/source/API/core/view/layoutStride.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ Description

.. cpp:type:: array_layout

A tag signifying that this models the Layout concept
A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0)
A tag signifying that this models the Layout concept. (Deprecated since Kokkos 5.0: use ``layout_type``)


.. cpp:type:: layout_type

A tag signifying that this models the Layout concept.

.. rubric:: Constructors

Expand Down
12 changes: 6 additions & 6 deletions docs/source/API/core/view/realloc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Description

- ``n[X]``: new length for extent X.

* Restrictions: ``View<T, P...>::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``.
* Restrictions: ``View<T, P...>::layout_type`` is either ``LayoutLeft`` or ``LayoutRight``.

.. code-block:: cpp

Expand All @@ -63,7 +63,7 @@ Description
- ``arg_prop``: View constructor property, e.g., ``Kokkos::WithoutInitializing``.


* Restrictions: ``View<T, P...>::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``.
* Restrictions: ``View<T, P...>::layout_type`` is either ``LayoutLeft`` or ``LayoutRight``.

.. code-block:: cpp

Expand Down Expand Up @@ -91,15 +91,15 @@ Description

* Restrictions:

- ``View<T, P...>::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``.
- ``View<T, P...>::layout_type`` is either ``LayoutLeft`` or ``LayoutRight``.

- ``arg_prop`` must not include a pointer to memory, a label, or a memory space.

.. code-block:: cpp

template <class T, class... P>
void realloc(Kokkos::View<T, P...>& v,
const typename Kokkos::View<T, P...>::array_layout& layout);
const typename Kokkos::View<T, P...>::layout_type& layout);

* Resizes ``v`` to have the new dimensions without preserving its contents.

Expand All @@ -111,7 +111,7 @@ Description

template <class I, class T, class... P>
void realloc(const I& arg_prop, Kokkos::View<T, P...>& v,
const typename Kokkos::View<T, P...>::array_layout& layout);
const typename Kokkos::View<T, P...>::layout_type& layout);

* Resizes ``v`` to have the new dimensions without preserving its contents.
The new ``Kokkos::View`` is constructed using the View constructor property ``arg_prop``, e.g., Kokkos::WithoutInitializing.
Expand All @@ -127,7 +127,7 @@ Description
template <class ALLOC_PROP, class T, class... P>
void realloc(const ALLOC_PROP& arg_prop,
Kokkos::View<T, P...>& v,
const typename Kokkos::View<T, P...>::array_layout& layout);
const typename Kokkos::View<T, P...>::layout_type& layout);

* Resizes ``v`` to have the new dimensions without preserving its contents.
The new ``Kokkos::View`` is constructed using the View constructor properties ``arg_prop``, e.g., ``Kokkos::view_alloc(Kokkos::WithoutInitializing)``.
Expand Down
Loading