I just read this:
Since the functionality of Concurrency::completion_future appears to mimick std::future I thought I could do something similar, but this relatively simple example fails:
#include <assert.h>
#include <chrono>
#include <iostream>
#include <amp.h>
int main()
{
    using namespace Concurrency;
    int big = 1000000; // this should take a while to send back to the host
    array_view<int> av(big);
    parallel_for_each(extent<1>(big), [=](index<1> idx) restrict(amp)
    {
        av[idx] = idx[0];
    });
    int i = 0;
    completion_future future = av.synchronize_async();
    // this should be false; how could it instantly sent back so much data?
    bool const gpuFinished = future.wait_for(std::chrono::seconds(0)) == std::future_status::ready;
    assert(!gpuFinished); // FAIL! why?
    future.wait();
    system("pause");
}
Why would that assert fail?
 
     
     
    