Skip to content

Commit

Permalink
docstring for HostWrite ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuad-HH committed Dec 13, 2024
1 parent 3a2f0a0 commit ed98f27
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 elements in the array.
* \param offset The initial value to set for the first element in the array.
* \param stride The difference between the values of consecutive elements 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 element to the specified offset,
* and each subsequent element to the previous element'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 ed98f27

Please sign in to comment.