Skip to content
Snippets Groups Projects
Commit fe5d2f90 authored by patavirt's avatar patavirt
Browse files

array: add .fill()

parent 45543c27
No related branches found
No related tags found
No related merge requests found
...@@ -419,6 +419,15 @@ public: ...@@ -419,6 +419,15 @@ public:
static_assert(Shape::size == detail::ShapeType<Dims...>::size, "incompatible shapes"); static_assert(Shape::size == detail::ShapeType<Dims...>::size, "incompatible shapes");
return {data(), Base::size(), shape}; return {data(), Base::size(), shape};
} }
/** Fill with value */
void fill(const Scalar& value)
{
const size_t n = Base::size();
for (size_t i = 0; i < n; ++i)
data_[i] = value;
}
}; };
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment