Skip to content

Commit

Permalink
Merge pull request #126 from Fuad-HH/hostwrite_docstring
Browse files Browse the repository at this point in the history
Docstring Added for HostWrite Constructor
  • Loading branch information
cwsmith authored Dec 13, 2024
2 parents 3a2f0a0 + 9fd5353 commit 7e79631
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Omega_h_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,21 @@ class HostWrite {
using value_type = T;
HostWrite() = default;
HostWrite(LO size_in, std::string const& name = "");

/**
* \brief Constructs a HostWrite object with specified size, offset, and stride.
*
* \param size_in The number of entries in the array.
* \param offset The initial value to set for the first entry of the array.
* \param stride The difference between the values of consecutive entries in the array.
* \param name The name of the array for identification purposes (default is an empty string).
*
* This constructor initializes a HostWrite array with the given size, setting the first entry to the specified offset,
* and each subsequent entry to the previous entry's value plus the stride. The array is given a name for identification.
* For example, `HostWrite<Real> h_write(10, 7.0, 0.0);` will create a write array of size 10 and all filled with 7.0.
*/
HostWrite(LO size_in, T offset, T stride, std::string const& name = "");

HostWrite(Write<T> write_in);
HostWrite(std::initializer_list<T> l, std::string const& name = "");
Write<T> write() const;
Expand Down

0 comments on commit 7e79631

Please sign in to comment.