mem#

Fully qualified name: cupva::mem

namespace mem#

Enumerations#

uint32_t AccessType

Specify the host-allocated memory permission.

uint32_t AllocType

Specifies the host-memory-allocation type.

uint32_t BufferType

Specifies the host-memory-buffer type.

uint32_t ExternalAllocType

Specifies the external allocation type.

uint32_t L2OperationType

CmdL2Ops operation types.

uint32_t L2SRAMPolicyType

L2SRAM mapping policy types.

Functions#

void * Alloc(int64_t const size, AccessType const accessType=AccessType::READ_WRITE, AllocType const allocType=AllocType::ALLOC_DRAM)

Allocate memory that is accessible by PVA engine.

void ConvertToGeometry(cupva::mem::SurfaceAttributes const &attr, int32_t const bpp, PlanarGeometry &geom)

Convert the surface attributes to planar geometry.

void Free(void *const devicePtr)

Free the allocated memory.

void * GetHostPointer(void *const devicePtr)

Get the host CPU mapped pointer for the given PVA pointer.

void * GetL2BaseAddress()

Request a device pointer to the L2SRAM (Orin Only).

void GetPointerAttributes(const void *const devicePtr, PointerAttributes &attr)

Query the pointer attributes for the given PVA pointer.

void GetSurfaceAttributes(const void *const devicePtr, SurfaceAttributes &attr)

Query the surface attributes for the given PVA pointer.

void * ImportFromHostPtr(void *const hostPtr, int64_t const size, AccessType const access=AccessType::READ_WRITE)

Create a PVA pointer from a libc allocated host CPU pointer (L4T only API).

void * MapL2(void *devptr, uint32_t size, mem::L2SRAMPolicyType policy=mem::L2SRAMPolicyType::FILL_AND_FLUSH)

Creates a device pointer for an L2SRAM buffer of given size with an optional DRAM buffer backing for persistence and associated cache policy.

void Register(const void *const ptr, int64_t const size, cupva::mem::ExternalAllocType const externalAllocType)

Register an external pointer to CUPVA space.

void Unregister(const void *const ptr)

Unregisters an external pointer from CUPVA space.

Data Structures#

PlaneInfo

Plane info.

PointerAttributes

Pointer attributes.

SurfaceAttributes

Surface attributes.