static void call(grid<Real> const & g, BufferType & buffer) { hpx::util::high_resolution_timer timer; Real * data = new Real[g.ny_ * g.nz_]; buffer = BufferType(data, g.ny_ * g.nz_, BufferType::take); typename BufferType::value_type * src = buffer.data(); for(std::size_t z = 0; z != g.nz_; ++z) { for(std::size_t y = 0; y != g.ny_; ++y) { *src = g(1, y, z); ++src; } } double elapsed = timer.elapsed(); profiling::data().time_pack_x(elapsed); profiling::data().time_pack(elapsed); }