Skip to content

Commit

Permalink
renamed devAllocatorStorage into devAllocatorBuffer, since it's a buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed May 25, 2020
1 parent 2e320dc commit e7649de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/include/mallocMC/allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace mallocMC
alpaka::dim::DimInt<1>,
int>;
std::unique_ptr<DevAllocatorStorageBufferType>
devAllocatorStorage; // FIXME(bgruber): replace by std::optional<>
devAllocatorBuffer; // FIXME(bgruber): replace by std::optional<>
HeapInfo heapInfos;

/** allocate heap memory
Expand All @@ -162,13 +162,13 @@ namespace mallocMC
void * pool = alpaka::mem::view::getPtrNative(*poolBuffer);
std::tie(pool, size) = AlignmentPolicy::alignPool(pool, size);

devAllocatorStorage
devAllocatorBuffer
= std::make_unique<DevAllocatorStorageBufferType>(
alpaka::mem::buf::alloc<DevAllocator, int>(dev, 1));
CreationPolicy::template initHeap<AlpakaAcc>(
dev,
queue,
alpaka::mem::view::getPtrNative(*devAllocatorStorage),
alpaka::mem::view::getPtrNative(*devAllocatorBuffer),
pool,
size);

Expand All @@ -183,7 +183,7 @@ namespace mallocMC
*/
ALPAKA_FN_HOST void free()
{
devAllocatorStorage = {};
devAllocatorBuffer = {};
poolBuffer = {};
heapInfos = {};
}
Expand Down Expand Up @@ -224,7 +224,7 @@ namespace mallocMC
auto getAllocatorHandle() -> AllocatorHandle
{
return AllocatorHandle{
alpaka::mem::view::getPtrNative(*devAllocatorStorage)};
alpaka::mem::view::getPtrNative(*devAllocatorBuffer)};
}

ALPAKA_FN_HOST
Expand Down

0 comments on commit e7649de

Please sign in to comment.