diff --git a/docs/source/API/core/view/resize.rst b/docs/source/API/core/view/resize.rst index ccccfae19..e65253af7 100644 --- a/docs/source/API/core/view/resize.rst +++ b/docs/source/API/core/view/resize.rst @@ -20,67 +20,73 @@ Reallocates a view to have the new dimensions. Can grow or shrink, and will pres Description ----------- -.. cppkokkos::function: template \ - void resize(View& v,\ - const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG); - - Resizes ``v`` to have the new dimensions while preserving the contents for the common subview of the old and new view. +* .. code-block:: cpp - :param v: existing view, can be a default constructed one. + template + void resize(View& v, + const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG); - :param n[X]: new length for extent X. + Resizes ``v`` to have the new dimensions while preserving the contents for the common subview of the old and new view. - Restrictions: ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. + * ``v``: existing view, can be a default constructed one. + * ``n[X]``: new length for extent X. -| + Restrictions: -.. cppkokkos::function: template \ - void resize(const I& arg_prop, Kokkos::View& v, \ - const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,\ - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG); + * ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. - Resizes ``v`` to have the new dimensions while preserving the contents for the - common subview of the old and new view. The new ``Kokkos::View`` is constructed using the View constructor property ``arg_prop``, e.g., Kokkos::WithoutInitializing. +* .. code-block:: cpp - :param v: existing view, can be a default constructed one. + template + void resize(const I& arg_prop, Kokkos::View& v, + const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG); + + Resizes ``v`` to have the new dimensions while preserving the contents for the common + subview of the old and new view. The new ``Kokkos::View`` is constructed using the + View constructor property ``arg_prop``, e.g., Kokkos::WithoutInitializing. - :param n[X]: new length for extent X. + * ``v``: existing view, can be a default constructed one. - :param arg_prop: View constructor property, e.g., ``Kokkos::WithoutInitializing``. + * ``n[X]``: new length for extent X. - Restrictions: ``View::array_layout`` is either ``LayoutLeft` or `LayoutRight``. + * ``arg_prop``: View constructor property, e.g., ``Kokkos::WithoutInitializing``. -| + Restrictions: + * ``View::array_layout`` is either ``LayoutLeft` or `LayoutRight``. * .. code-block:: cpp - template - void resize(const Impl::ViewCtorProp& arg_prop, - Kokkos::View& v, - const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG); - - Resizes ``v`` to have the new dimensions while preserving the contents for the common subview of the old and new view. The new ``Kokkos::View`` is constructed using the View constructor properties ``arg_prop``, e.g., ``Kokkos::view_alloc(Kokkos::WithoutInitializing)``. If ``arg_prop`` includes an execution space, it is used for allocating memory and for copying elements without using a final fence. + template + void resize(const Impl::ViewCtorProp& arg_prop, + Kokkos::View& v, + const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG); + + Resizes ``v`` to have the new dimensions while preserving the contents for the common + subview of the old and new view. The new ``Kokkos::View`` is constructed using the View constructor + properties ``arg_prop``, e.g., ``Kokkos::view_alloc(Kokkos::WithoutInitializing)``. + If ``arg_prop`` includes an execution space, it is used for allocating memory and for copying elements without using a final fence. * ``v``: existing view, can be a default constructed one. * ``n[X]``: new length for extent X. @@ -93,9 +99,9 @@ Description * .. code-block:: cpp - template - void resize(Kokkos::View& v, - const typename Kokkos::View::array_layout& layout); + template + void resize(Kokkos::View& v, + const typename Kokkos::View::array_layout& layout); Resizes ``v`` to have the new dimensions while preserving the contents for the common subview of the old and new view. @@ -104,11 +110,13 @@ Description * .. code-block:: cpp - template - void resize(const I& arg_prop, Kokkos::View& v, - const typename Kokkos::View::array_layout& layout); + template + void resize(const I& arg_prop, Kokkos::View& v, + const typename Kokkos::View::array_layout& layout); - Resizes ``v`` to have the new dimensions while preserving the contents for the common subview of the old and new view. The new ``Kokkos::View`` is constructed using the View constructor property ``arg_prop``, e.g., Kokkos::WithoutInitializing. + Resizes ``v`` to have the new dimensions while preserving the contents for the common subview + of the old and new view. The new ``Kokkos::View`` is constructed using the View constructor + property ``arg_prop``, e.g., Kokkos::WithoutInitializing. * ``v``: existing view, can be a default constructed one. * ``layout``: a layout instance containing the new dimensions. @@ -116,12 +124,15 @@ Description * .. code-block:: cpp - template - void resize(const Impl::ViewCtorProp& arg_prop, - Kokkos::View& v, - const typename Kokkos::View::array_layout& layout); + template + void resize(const Impl::ViewCtorProp& arg_prop, + Kokkos::View& v, + const typename Kokkos::View::array_layout& layout); - Resizes ``v`` to have the new dimensions while preserving the contents for the common subview of the old and new view. The new ``Kokkos::View`` is constructed using the View constructor properties ``arg_prop``, e.g., ``Kokkos::view_alloc(Kokkos::WithoutInitializing)``. If ``arg_prop`` includes an execution space, it is used for allocating memory and for copying elements without using a final fence. + Resizes ``v`` to have the new dimensions while preserving the contents for the + common subview of the old and new view. The new ``Kokkos::View`` is constructed using + the View constructor properties ``arg_prop``, e.g., ``Kokkos::view_alloc(Kokkos::WithoutInitializing)``. + If ``arg_prop`` includes an execution space, it is used for allocating memory and for copying elements without using a final fence. * ``v``: existing view, can be a default constructed one. * ``layout``: a layout instance containing the new dimensions.