 #include <cassert>
 #include <iostream>
 #include <chrono>
-#include <array>
 #include <agency/execution_policy.hpp>
 #include <agency/cuda/execution_policy.hpp>
 #include <agency/cuda/multidevice_executor.hpp>
-#include <agency/experimental/span.hpp>
+#include <agency/cuda/experimental/multidevice_array.hpp>
 #include <agency/experimental/view.hpp>
 
 

  {
    // put this in its own scope so that ref's storage gets deallocated
    // before we measure performance
    container ref(n, a * 1.f + 2.f);
    assert(ref == z);
  }

  // ensure everything migrates back to the GPU before timing
  saxpy(exec, n, a, view(x), view(y), view(z));

  std::cout << "Measuring performance..." << std::endl;

  // time a number of trials
  size_t num_trials = 20;

  double bandwidth = gigabytes / seconds;

  std::cout << "SAXPY Bandwidth: " << bandwidth << " GB/s" << std::endl;
}

int main()
{
  std::cout << "Measuring the performance of SAXPY using contiguous containers..." << std::endl;
  using contiguous_container = std::vector<float, agency::cuda::managed_allocator<float>>;
  time_saxpy<contiguous_container>();

  std::cout << std::endl;

  std::cout << "Measuring the performance of SAXPY using segmented containers..." << std::endl;
  using segmented_container = agency::cuda::experimental::multidevice_array<float>;
  time_saxpy<segmented_container>();

  return 0;
}
