[Openmp-commits] [PATCH] D81054: [OpenMP] Introduce target memory manager
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 3 15:47:51 PDT 2020
jdoerfert added inline comments.
================
Comment at: openmp/libomptarget/src/device.h:32
+class MemoryManagerTy;
+} // namespace memory
----------------
Can we call these things `MemoryManagerInterface` and `MemoryManagerImpl` instead?
================
Comment at: openmp/libomptarget/src/memory.cpp:10
+// Functionality for managing target memory.
+//
+//===----------------------------------------------------------------------===//
----------------
Can you add description of the algorithm here please. What is happening and why.
================
Comment at: openmp/libomptarget/src/memory.cpp:35
+
+constexpr const int NumBuckets = sizeof(BucketSize) / sizeof(size_t);
+
----------------
================
Comment at: openmp/libomptarget/src/memory.cpp:38
+/// The threshold to manage memory using memory manager
+size_t SizeThreshold = BucketSize[NumBuckets - 1];
+
----------------
================
Comment at: openmp/libomptarget/src/memory.cpp:66
+ return L;
+}
+
----------------
`-inline` `+static`
================
Comment at: openmp/libomptarget/src/memory.h:31
+ /// Constructor
+ MemoryManagerTy(DeviceTy &D, size_t Threshold = 0);
+
----------------
Describe what `Threshold` does (in some detail)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81054/new/
https://reviews.llvm.org/D81054
More information about the Openmp-commits
mailing list