From 70c7debaa566781363f5ba4146ae0ffd4817d187 Mon Sep 17 00:00:00 2001 From: antoinemeyer5 Date: Wed, 8 Mar 2023 14:51:07 +0100 Subject: [PATCH] kokkos#120: API/core/view/realloc remove synopsis, fix indentation and fix function parameters --- docs/source/API/core/view/realloc.rst | 80 ++++----------------------- 1 file changed, 12 insertions(+), 68 deletions(-) diff --git a/docs/source/API/core/view/realloc.rst b/docs/source/API/core/view/realloc.rst index 45fd3284a..18b4348fe 100644 --- a/docs/source/API/core/view/realloc.rst +++ b/docs/source/API/core/view/realloc.rst @@ -16,58 +16,6 @@ Usage Reallocates a view to have the new dimensions. Can grow or shrink, and will not preserve content. -Synopsis --------- - -.. code-block:: cpp - - template - void realloc(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); - - template - void realloc(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); - - template - void realloc(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); - - template - void realloc(Kokkos::View& v, - const typename Kokkos::View::array_layout& layout); - - template - void realloc(const I& arg_prop, Kokkos::View& v, - const typename Kokkos::View::array_layout& layout); - - template - void realloc(const Impl::ViewCtorProp& arg_prop, - Kokkos::View& v, - const typename Kokkos::View::array_layout& layout); - Description ----------- @@ -88,9 +36,8 @@ Description - ``v``: existing view, can be a default constructed one. - ``n[X]``: new length for extent X. - Restrictions: - - * ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. +* Restrictions: + - ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. .. code-block:: cpp @@ -110,14 +57,13 @@ Description - ``n[X]``: new length for extent X. - ``arg_prop``: View constructor property, e.g., ``Kokkos::WithoutInitializing``. - Restrictions: - - * ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. +* Restrictions: + - ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. .. code-block:: cpp template - void realloc(const I& arg_prop, Kokkos::View& v, + void realloc(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, @@ -133,10 +79,9 @@ Description - ``n[X]``: new length for extent X. - ``arg_prop``: View constructor properties, e.g., ``Kokkos::view_alloc(Kokkos::WithoutInitializing)``. - Restrictions: - - * ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. - * ``arg_prop`` must not include a pointer to memory, a label, or a memory space. +* Restrictions: + - ``View::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``. + - ``arg_prop`` must not include a pointer to memory, a label, or a memory space. .. code-block:: cpp @@ -162,7 +107,7 @@ Description .. code-block:: cpp template - void realloc(const I& arg_prop, Kokkos::View& v, + void realloc(const Impl::ViewCtorProp& arg_prop, Kokkos::View& v, const typename Kokkos::View::array_layout& layout); @@ -171,9 +116,8 @@ Description - ``layout``: a layout instance containing the new dimensions. - ``arg_prop``: View constructor properties, e.g., ``Kokkos::view_alloc(Kokkos::WithoutInitializing)``. - Restrictions: - - * ``arg_prop`` must not include a pointer to memory, a label, or a memory space. +* Restrictions: + - ``arg_prop`` must not include a pointer to memory, a label, or a memory space. Example ------- @@ -183,7 +127,7 @@ Example Kokkos::realloc(v, 2, 3); * Reallocate a ``Kokkos::View`` with dynamic rank 2 to have dynamic extent 2 and 3 respectively. - + .. code-block:: cpp Kokkos::realloc(Kokkos::WithoutInitializing, v, 2, 3);