 	cuda::memory::copy(ptr_in.get(), other_arr);
 
 	check_output_is_iota("copy from (managed) global memory into a 2D array", ptr_in.get(), arr.size());
-	
+
 	// also asynchronously
-	auto stream = device.create_stream(cuda::stream::async);
+	auto stream = cuda::stream::create(device, cuda::stream::async);
 	cuda::memory::async::copy(other_arr, ptr_out.get(), stream);
 	cuda::memory::async::copy(ptr_in.get(), other_arr, stream);
 	device.synchronize();

#include <numeric>
#include <limits>

using std::size_t;

namespace kernels {


	auto arr = cuda::array::create<float>(device , dims);
	auto ptr_in = cuda::memory::managed::make_unique<float[]>(arr.size());
	std::iota(ptr_in.get(), ptr_in.get() + arr.size(), 0);

	std::cout << std::endl;

    print_2d_array("Data at ptr_in after initialization", ptr_in.get(), w, h);

	cuda::memory::copy(arr, ptr_in.get());
	cuda::texture_view tv(arr);
