Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Sep 28, 2023
1 parent db05487 commit c812e07
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
16 changes: 10 additions & 6 deletions include/cuco/detail/open_addressing_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,16 @@ class open_addressing_impl {

/**
* @brief Constructs a statically-sized open addressing data structure with the number of elements
* to insert, sentinel values, the desired load factor and CUDA stream
*
* @note The actual capacity depends on the given `n`, the probing scheme, CG size, the desired
* load factor and the window size and it is computed via the `make_window_extent` factory. Insert
* operations will not automatically grow the container. Attempting to insert more unique keys
* than the capacity of the container results in undefined behavior.
* to insert `n`, the desired load factor, etc.
*
* @note This constructor helps users create a data structure based on the number of elements to
* insert and the desired load factor without manually computing the desired capacity. The actual
* capacity will be a size no smaller than `ceil(n / desired_load_factor)`. It's determined by
* multiple factors including the given `n`, the desired load factor, the probing scheme, the CG
* size, and the window size and is computed via the `make_window_extent` factory.
* @note Insert operations will not automatically grow the container.
* @note Attempting to insert more unique keys than the capacity of the container results in
* undefined behavior.
* @note Any `*_sentinel`s are reserved and behavior is undefined when attempting to insert
* this sentinel value.
* @note This constructor doesn't synchronize the given stream.
Expand Down
19 changes: 11 additions & 8 deletions include/cuco/static_map.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,17 @@ class static_map {
cuda_stream_ref stream = {});

/**
* @brief Constructs a statically-sized map with the number of elements to insert, sentinel
* values, the desired load factor, and CUDA stream
*
* The actual map capacity depends on the given `n`, the probing scheme, CG size, the desired load
* factor and the window size and it is computed via the `make_window_extent` factory. Insert
* operations will not automatically grow the map. Attempting to insert more unique keys than the
* capacity of the map results in undefined behavior.
*
* @brief Constructs a statically-sized map with the number of elements to insert `n`, the desired
* load factor, etc
*
* @note This constructor helps users create a map based on the number of elements to insert and
* the desired load factor without manually computing the desired capacity. The actual map
* capacity will be a size no smaller than `ceil(n / desired_load_factor)`. It's determined by
* multiple factors including the given `n`, the desired load factor, the probing scheme, the CG
* size, and the window size and is computed via the `make_window_extent` factory.
* @note Insert operations will not automatically grow the container.
* @note Attempting to insert more unique keys than the capacity of the container results in
* undefined behavior.
* @note Any `*_sentinel`s are reserved and behavior is undefined when attempting to insert
* this sentinel value.
* @note This constructor doesn't synchronize the given stream.
Expand Down
19 changes: 11 additions & 8 deletions include/cuco/static_set.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,17 @@ class static_set {
cuda_stream_ref stream = {});

/**
* @brief Constructs a statically-sized set with the specified initial capacity, sentinel values,
* the desired load factor, and CUDA stream
*
* The actual set capacity depends on the given `n`, the probing scheme, CG size, the desired load
* factor and the window size and it is computed via the `make_window_extent` factory. Insert
* operations will not automatically grow the set. Attempting to insert more unique keys than the
* capacity of the map results in undefined behavior.
*
* @brief Constructs a statically-sized map with the number of elements to insert `n`, the desired
* load factor, etc
*
* @note This constructor helps users create a set based on the number of elements to insert and
* the desired load factor without manually computing the desired capacity. The actual set
* capacity will be a size no smaller than `ceil(n / desired_load_factor)`. It's determined by
* multiple factors including the given `n`, the desired load factor, the probing scheme, the CG
* size, and the window size and is computed via the `make_window_extent` factory.
* @note Insert operations will not automatically grow the container.
* @note Attempting to insert more unique keys than the capacity of the container results in
* undefined behavior.
* @note Any `*_sentinel`s are reserved and behavior is undefined when attempting to insert
* this sentinel value.
* @note This constructor doesn't synchronize the given stream.
Expand Down

0 comments on commit c812e07

Please sign in to comment.