18 #include <sys/types.h>
23 #include <kvikio/shim/cuda.hpp>
55 void* _devPtr_base{
nullptr};
56 CUstream _stream{
nullptr};
57 ArgByVal* _val{
nullptr};
58 bool _stream_synchronized{
false};
64 void* devPtr_base, std::size_t size, off_t file_offset, off_t devPtr_offset, CUstream stream);
80 std::tuple<void*, std::size_t*, off_t*, off_t*, ssize_t*, CUstream>
get_args()
const;
Future of an asynchronous IO operation.
StreamFuture(const StreamFuture &)=delete
StreamFuture support move semantic but isn't copyable.
~StreamFuture() noexcept
Free the by-value arguments and make sure the associated CUDA stream has been synchronized.
std::tuple< void *, std::size_t *, off_t *, off_t *, ssize_t *, CUstream > get_args() const
Return the arguments of the future call.
std::size_t check_bytes_done()
Return the number of bytes read or written by the future operation.