diff --git a/docs/source/API/containers/ScatterView.rst b/docs/source/API/containers/ScatterView.rst index a4690122a..f86fb91bf 100644 --- a/docs/source/API/containers/ScatterView.rst +++ b/docs/source/API/containers/ScatterView.rst @@ -6,16 +6,34 @@ Header File: ```` -.. _parallelReduce: ../core/parallel-dispatch/parallel_reduce.html +Description +----------- +`Kokkos View-based <../core/view/view.html>`_ data structure that abstracts over "scatter - contribute" algorithms, where many contributors (over multiple indices) are reduced to fewer output resultants (*e.g.*, sum, product, maximum or minimum). ``ScatterView`` transparently switches between **Atomic**-, and **Data Replication**-based scatter algorithms. Typically, a ``ScatterView`` wraps an existing View. -.. |parallelReduce| replace:: :cpp:func:`parallel_reduce` -Description +Interface +----------- + +.. cppkokkos:class:: template ScatterView + + +Parameters ----------- -.. cppkokkos:class:: template ScatterView +* ``DataType``: See `Kokkos View DataType <../core/view/view.html>`_ + +* ``Layout``: See `Kokkos View LayoutType <../core/view/view.html>`_ - .. rubric:: Public Member Variables +* ``ExecutionSpace``: Defaults to ``Kokkos::DefaultExecutionSpace`` + +* ``Operation``: ScatterSum, ScatterProd, ScatterMin, ScatterMax + +* ``Duplication``: ScatterDuplicated, ScatterNonDuplicated + +* ``Contribution``: ScatterAtomic, ScatterNonAtomic + +Public Class Members +-------------------- .. cppkokkos:type:: original_view_type @@ -31,7 +49,7 @@ Description .. cppkokkos:type:: data_type_info - DuplicatedDataType, a newly created DataType that has a new runtime dimension which becomes the largest-stride dimension, from the given View DataType. + DuplicatedDataType, a newly created DataType with a new runtime dimension that becomes the largest-stride dimension from the given View DataType. .. cppkokkos:type:: internal_data_type @@ -39,9 +57,11 @@ Description .. cppkokkos:type:: internal_view_type - A View type created from the internal_data_type. + Type alias for a View type created from the internal_data_type. - .. rubric:: Constructors + +Constructors +------------- .. cppkokkos:function:: ScatterView() @@ -61,11 +81,9 @@ Description This constructor allows passing an object created by ``Kokkos::view_alloc`` as first argument, e.g., for specifying an execution space via ``Kokkos::view_alloc(exec_space, "label")``. - .. rubric:: Public Methods - - .. cppkokkos:function:: constexpr bool is_allocated() const - :return: true if the ``internal_view`` points to a valid memory location. This function works for both managed and unmanaged views. With the unmanaged view, there is no guarantee that referenced address is valid, only that it is a non-null pointer. +Public Class Methods +-------------------- .. cppkokkos:function:: access() const @@ -85,7 +103,7 @@ Description .. cppkokkos:function:: reset_except(View const& view) - tbd + excludes a Kokkos View from reset .. cppkokkos:function:: resize(const size_t n0 = 0, const size_t n1 = 0, const size_t n2 = 0, const size_t n3 = 0, const size_t n4 = 0, const size_t n5 = 0, const size_t n6 = 0, const size_t n7 = 0) @@ -96,18 +114,15 @@ Description resize a view with discarding old data - .. rubric:: *Private* Members - - :member: typedef original_view_type internal_view_type; - :member: internal_view_type internal_view; +Free Functions +-------------------- -.. rubric:: Free Functions .. cppkokkos:function:: contribute(View& dest, Kokkos::Experimental::ScatterView const& src) convenience function to perform final reduction of ScatterView - results into a resultant View; may be called following |parallelReduce|_. + (intermediate) results into a (final) resultant View; may be called following `parallel_reduce <../core/parallel-dispatch/parallel_reduce.html>`_ . Example