Skip to content

Instantly share code, notes, and snippets.

@JohanMabille
Created January 7, 2020 10:04
Show Gist options
  • Save JohanMabille/b5fc35283e7ef9b24b6972e125fafd3b to your computer and use it in GitHub Desktop.
Save JohanMabille/b5fc35283e7ef9b24b6972e125fafd3b to your computer and use it in GitHub Desktop.
template <class T, layout_type L, class A>
xarray<T, L, A>::xarray(const shape_type& shape, layout_type l)
: xarray()
{
resize(shape, layout);
}
template <class T, layout_type L, class A>
xarray<T, L, A>::xarray(const shape_type& shape, const_reference,
layout_type l)
: xarray()
{
resize(shape, layout);
std::fill(m_storage.begin(), m_storage.end(), value);
}
// The implementation of the constructors accepting the strides
// instead of the layout is similar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment