Skip to content

Commit

Permalink
Implement PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
e10harvey committed Jul 20, 2023
1 parent 1d27bd0 commit 19f37ad
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions docs/source/API/containers/Unordered-Map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ Description
.. cppkokkos:kokkosinlinefunction:: UnorderedMapInsertResult insert(key) const;
Insert the given key into the map with a default constructed value
Optionally specify the operator, op, used for combining values if
key already exists.

.. cppkokkos:kokkosinlinefunction:: UnorderedMapInsertResult insert(Key key, Value value, Insert op = NoOp) const;
Insert the given key/value pair into the map
Insert the given key/value pair into the map and optionally specify
the operator, op, used for combining values if key already exists

.. cppkokkos:kokkosinlinefunction:: uint32_t find(Key key) const
Expand Down Expand Up @@ -122,18 +121,21 @@ Description

:tparam ValuesIdxType: The index type for lookups in the value array.

.. rubric:: Public Methods
.. rubric:: *Public* Insertion Operator Types

.. cppkokkos:struct:: NoOp
The first key inserted stores the associated value (default op).

.. cppkokkos:struct:: NoOp
.. cppkokkos:struct:: AtomicAdd
Duplicate key insertions sum values together.

.. cppkokkos:struct:: AtomicAdd

Insertion using default UnorderedMapInsertOpTypes::NoOp
-------------------------------------------------------
.. _unordered_map_insert_op_types_noop:

Insertion using default ``UnorderedMapInsertOpTypes::NoOp``
-----------------------------------------------------------

There are 3 potential states for every insertion which are reported by the ``UnorderedMapInsertResult``:

Expand All @@ -159,10 +161,10 @@ There are 3 potential states for every insertion which are reported by the ``Uno
map.insert(i, values(i));
});
Insertion using UnorderedMapInsertOpTypes::AtomicAdd
-------------------------------------------------------
Insertion using ``UnorderedMapInsertOpTypes::AtomicAdd``
--------------------------------------------------------

The behavior from ``Insertion using the default UnorderedMapInsertOpTypes::NoOp`` hold true with the
The behavior from :ref:`unordered_map_insert_op_types_noop` holds true with the
exception that the ``UnorderedMapInsertResult``:

- ``existing`` implies that the key is already in the map and the existing value at key was summed
Expand Down

0 comments on commit 19f37ad

Please sign in to comment.