Function cvcuda::AllocateWorkspace

Function Documentation

inline UniqueWorkspace cvcuda::AllocateWorkspace(WorkspaceRequirements req, nvcv::Allocator alloc = {})

Allocates a workspace with an allocator specified in alloc (or a default one).

This function is meant as a simple helper to simplify the usage operators requiring a workspace, but its intense use may degrade performance due to excessive allocations and deallocations. For code used in tight loops, some workspace reuse scheme and/or resource pools are recommended.