NVIDIA DeepStream SDK API Reference

7.1 Release
NvDsMemoryAllocator.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef _NVDS_MEMORY_ALLOCATOR_H_
14 #define _NVDS_MEMORY_ALLOCATOR_H_
15 
16 #include "INvDsAllocator.h"
17 
21 typedef enum
22 {
32 } NvDsMemType;
33 
34 
36 {
37  public:
38 
39  NvDsMemoryAllocator(uint32_t gpuId, NvDsMemType memType);
40  void* Allocate (uint32_t size);
41  void Deallocate (void* data);
42 
43  private:
44  uint32_t gpuId;
45  NvDsMemType memType;
46 };
47 
48 #endif
NvDsMemoryAllocator::NvDsMemoryAllocator
NvDsMemoryAllocator(uint32_t gpuId, NvDsMemType memType)
NVDS_MEM_SYSTEM
@ NVDS_MEM_SYSTEM
Specifies memory allocated by malloc().
Definition: NvDsMemoryAllocator.h:31
NvDsMemoryAllocator::Deallocate
void Deallocate(void *data)
INvDsAllocator.h
INvDsAllocator
Definition: INvDsAllocator.h:18
NvDsMemoryAllocator::Allocate
void * Allocate(uint32_t size)
NvDsMemoryAllocator
Definition: NvDsMemoryAllocator.h:35
NVDS_MEM_CUDA_UNIFIED
@ NVDS_MEM_CUDA_UNIFIED
Specifies CUDA Unified memory type.
Definition: NvDsMemoryAllocator.h:29
NvDsMemType
NvDsMemType
Specifies memory types for NvDsMemory.
Definition: NvDsMemoryAllocator.h:21
NVDS_MEM_DEFAULT
@ NVDS_MEM_DEFAULT
Definition: NvDsMemoryAllocator.h:23
NVDS_MEM_CUDA_PINNED
@ NVDS_MEM_CUDA_PINNED
Specifies CUDA Host memory type.
Definition: NvDsMemoryAllocator.h:25
NVDS_MEM_CUDA_DEVICE
@ NVDS_MEM_CUDA_DEVICE
Specifies CUDA Device memory type.
Definition: NvDsMemoryAllocator.h:27