Class UniqueWorkspace

Class Documentation

class UniqueWorkspace

A helper class that manages the lifetime of resources stored in a Workspace structure.

This class works in a way similar to unique_ptr with a custom deleter.

Public Types

using DeleterFunc = void(NVCVWorkspace&)
using Deleter = std::function<DeleterFunc>

Public Functions

UniqueWorkspace() = default
UniqueWorkspace(const UniqueWorkspace&) = delete
inline UniqueWorkspace(UniqueWorkspace &&ws)
UniqueWorkspace &operator=(const UniqueWorkspace&) = delete
inline UniqueWorkspace &operator=(UniqueWorkspace &&ws) noexcept
inline UniqueWorkspace(Workspace workspace, Deleter del = {})
inline UniqueWorkspace(WorkspaceMem host, WorkspaceMem pinned, WorkspaceMem cuda, Deleter del = {})
inline ~UniqueWorkspace()
inline void reset() noexcept
inline const Workspace &get() const