@@ -71,7 +71,7 @@ struct BufferMem {
71
71
// / Size of the allocation in bytes
72
72
size_t Size;
73
73
// / A map that contains all the active mappings for this buffer.
74
- std::unordered_map<void *, BufferMap> PtrToBufferMap;
74
+ std::unordered_map<void *, BufferMap> PtrToBufferMap;
75
75
76
76
AllocMode MemAllocMode;
77
77
@@ -84,7 +84,7 @@ struct BufferMem {
84
84
85
85
size_t getSize () const noexcept { return Size; }
86
86
87
- BufferMap * getMapDetails (void * Map) {
87
+ BufferMap *getMapDetails (void * Map) {
88
88
auto details = PtrToBufferMap.find (Map);
89
89
if (details != PtrToBufferMap.end ()) {
90
90
return &details->second ;
@@ -104,7 +104,8 @@ struct BufferMem {
104
104
// / memory on the host.
105
105
auto MapMem = std::make_unique<unsigned char []>(MapSize);
106
106
MapPtr = MapMem.get ();
107
- PtrToBufferMap.insert ({MapPtr, BufferMap (MapSize, MapOffset, MapFlags, MapMem)});
107
+ PtrToBufferMap.insert (
108
+ {MapPtr, BufferMap (MapSize, MapOffset, MapFlags, MapMem)});
108
109
} else {
109
110
// / However, if HostPtr already has valid memory (e.g. pinned allocation),
110
111
// / we can just use that memory for the mapping.
@@ -115,7 +116,7 @@ struct BufferMem {
115
116
}
116
117
117
118
// / Detach the allocation from the host memory.
118
- void unmap (void * MapPtr) noexcept {
119
+ void unmap (void *MapPtr) noexcept {
119
120
assert (MapPtr != nullptr );
120
121
PtrToBufferMap.erase (MapPtr);
121
122
}
0 commit comments