Function nvcvImageConstruct

Function Documentation

NVCVStatus nvcvImageConstruct(const NVCVImageRequirements *reqs, NVCVAllocatorHandle alloc, NVCVImageHandle *handle)

Constructs and an image instance with given requirements in the given storage.

Parameters:
  • reqs[in] Image requirements. Must have been filled in by nvcvImageCalcRequirements.

    • Must not be NULL

  • alloc[in] Allocator to be used to allocate needed memory buffers.

    • The following resources are used:

      • host memory: for internal structures.

      • cuda memory: for image contents buffer. If NULL, it’ll use the internal default allocator.

    • Allocator must not be destroyed while an image still refers to it.

  • handle[out] Where the image instance handle will be written to.

    • Must not be NULL.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the image.

  • NVCV_SUCCESS – Operation executed successfully.