You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GPU/GPUTracking/Base/GPUMemoryResource.h
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -56,24 +56,24 @@ class GPUMemoryResource
56
56
57
57
public:
58
58
enum MemoryType {
59
-
MEMORY_HOST = 1,
60
-
MEMORY_GPU = 2,
61
-
MEMORY_INPUT_FLAG = 4,
62
-
MEMORY_INPUT = 7,
63
-
MEMORY_OUTPUT_FLAG = 8,
64
-
MEMORY_OUTPUT = 11,
65
-
MEMORY_INOUT = 15,
66
-
MEMORY_SCRATCH = 16,
67
-
MEMORY_SCRATCH_HOST = 17,
68
-
MEMORY_EXTERNAL = 32,
69
-
MEMORY_PERMANENT = 64,
70
-
MEMORY_CUSTOM = 128,
71
-
MEMORY_CUSTOM_TRANSFER = 256,
72
-
MEMORY_STACK = 512
59
+
MEMORY_HOST = 1,// Memory allocated on host (irrespective of other flags)
60
+
MEMORY_GPU = 2,// Memory allocated on GPU (irrespective of other flags)
61
+
MEMORY_INPUT_FLAG = 4,// Flag to signal this memory is copied to GPU with TransferMemoryResourcesToGPU, and alike
62
+
MEMORY_INPUT = 7,// Input data for GPU has the MEMORY_INPUT_FLAG flat and is allocated on host and GPU
63
+
MEMORY_OUTPUT_FLAG = 8,// Flag to signal this memory is copied to Host with TransferMemoryResourcesToHost, and alike
64
+
MEMORY_OUTPUT = 11,// Output data for GPU has the MEMORY_OUTPUT_FLAG flat and is allocated on host and GPU
65
+
MEMORY_INOUT = 15,// Combination if MEMORY_INPUT and MEMORY_OUTPUT
66
+
MEMORY_SCRATCH = 16,// Scratch memory, is allocated only on GPU by default if running on GPU, only on host otherwise, if MEMORY_HOST and MEMORY_GPU flags not set.
67
+
MEMORY_SCRATCH_HOST = 17,// Scratch memory only on host
68
+
MEMORY_EXTERNAL = 32,// Special flag to signal that memory on host shall not be allocated, but will be provided externally and manually
69
+
MEMORY_PERMANENT = 64,// Permanent memory, registered once with AllocateRegisteredPermanentMemory, not per time frame. Only for small sizes!
70
+
MEMORY_CUSTOM = 128,// Memory is not allocated automatically with AllocateRegisteredMemory(GPUProcessor), but must be allocated manually via AllocateRegisteredMemory(memoryId)
71
+
MEMORY_CUSTOM_TRANSFER = 256,// Memory is not transfered automatically with TransferMemoryResourcesTo, but must be transferred manually with TransferMemoryTo...(memoryId)
72
+
MEMORY_STACK = 512// Use memory from non-persistent stack at the end of the global memory region. Not persistent for full TF. Use PushNonPersistentMemory and PopNonPersistentMemory to release memory from the stack
73
73
};
74
-
enum AllocationType { ALLOCATION_AUTO = 0,
75
-
ALLOCATION_INDIVIDUAL = 1,
76
-
ALLOCATION_GLOBAL = 2 };
74
+
enum AllocationType { ALLOCATION_AUTO = 0,// --> GLOBAL if GPU is used, INDIVIDUAL otherwise
75
+
ALLOCATION_INDIVIDUAL = 1,// Individual memory allocations with malloc (host only)
76
+
ALLOCATION_GLOBAL = 2 };// Allocate memory blocks from large preallocated memory range with internal allocator (host and GPU)
0 commit comments