Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion GPU/GPUTracking/Global/GPUChainITS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "DataFormatsITS/TrackITS.h"
#include "ITStracking/ExternalAllocator.h"
#include "GPUReconstructionIncludesITS.h"
#include <algorithm>
#include <mutex>

using namespace o2::gpu;

Expand All @@ -28,13 +28,15 @@ class GPUFrameworkExternalAllocator final : public o2::its::ExternalAllocator
public:
void* allocate(size_t size) override
{
std::scoped_lock lck(mLock);
return mFWReco->AllocateDirectMemory(size, GPUMemoryResource::MEMORY_GPU);
}
void deallocate(char* ptr, size_t) override {}
void setReconstructionFramework(o2::gpu::GPUReconstruction* fwr) { mFWReco = fwr; }

private:
o2::gpu::GPUReconstruction* mFWReco;
std::mutex mLock;
};
} // namespace o2::its

Expand Down