Go to the documentation of this file.
26 #ifndef TILEDARRAY_CONVERSIONS_CLONE_H__INCLUDED
27 #define TILEDARRAY_CONVERSIONS_CLONE_H__INCLUDED
32 template <
typename,
typename>
42 template <
typename Tile,
typename Policy>
46 World& world = arg.
world();
52 for (
auto index : *arg.
pmap()) {
53 if (arg.
is_zero(index))
continue;
57 [](
const value_type& tile) -> value_type {
64 result.
set(index, tile);
72 #endif // TILEDARRAY_CONVERSIONS_CLONE_H__INCLUDED
void set(const Index &i, InIter first)
DistArray< Tile, Policy > clone(const DistArray< Tile, Policy > &arg)
Create a deep copy of an array.
const trange_type & trange() const
Tiled range accessor.
Future< value_type > find(const Index &i) const
Find local or remote tile by index.
const shape_type & shape() const
Shape accessor.
World & world() const
World accessor.
bool is_zero(const Index &i) const
Check for zero tiles.
const std::shared_ptr< pmap_interface > & pmap() const
Process map accessor.
An N-dimensional shallow copy wrapper for tile objects.