cuda::experimental::stf::stream_adapter

Defined in include/cuda/experimental/__stf/allocators/adapters.cuh

class stream_adapter

Allocator which defers allocations to the CUDA asynchronous memory allocations APIs (cudaMallocAsync, cudaFreeAsync)

This can be used as an alternative in CUDA graphs to avoid creating CUDA graphs with a large memory footprints.

Public Functions

template<typename context_t>
inline stream_adapter(context_t &ctx, cudaStream_t stream_)
inline void clear()

Free resources allocated by the stream_adapter object.

inline auto &allocator()

Get the underlying block allocator so that we can set the allocator of a context, or a logical data.