sexta-feira, 20 de julho de 2012 10:31
In the context of the following method:
concurrency::completion_future copy_async(const void * _Src, unsigned int _Src_byte_size, texture<_Value_type, _Rank>& _Dst)
What does it mean to wait for the returned future? I guess it simply waits for the host to device DMA transfer to finish. Though, my question is when would you be interested in waiting for that transfer to finish? I don't quite see how waiting or not waiting does any difference on the host side since the transfer is scheduled to the accelerator_view and automatically synced when used on the accelerator?
Todas as Respostas
sábado, 21 de julho de 2012 17:33
Semantically the returned future needs to be waited on before using the destination texture/array and/or modifying/freeing the host buffer/container. In the current implementation, we perform the host -> staging copy synchronously so it would be ok to access the destination texture without waiting for the future. So you only need to wait if you needs to free/modify the host buffer/container. However if we change that in the future, accessing the destination texture/array without waiting on the future would be unsafe.