We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1c484d commit 78e44f5Copy full SHA for 78e44f5
1 file changed
GPU/GPUTracking/Global/GPUChainITS.cxx
@@ -17,7 +17,7 @@
17
#include "DataFormatsITS/TrackITS.h"
18
#include "ITStracking/ExternalAllocator.h"
19
#include "GPUReconstructionIncludesITS.h"
20
-#include <algorithm>
+#include <mutex>
21
22
using namespace o2::gpu;
23
@@ -28,13 +28,15 @@ class GPUFrameworkExternalAllocator final : public o2::its::ExternalAllocator
28
public:
29
void* allocate(size_t size) override
30
{
31
+ std::scoped_lock lck(mLock);
32
return mFWReco->AllocateDirectMemory(size, GPUMemoryResource::MEMORY_GPU);
33
}
34
void deallocate(char* ptr, size_t) override {}
35
void setReconstructionFramework(o2::gpu::GPUReconstruction* fwr) { mFWReco = fwr; }
36
37
private:
38
o2::gpu::GPUReconstruction* mFWReco;
39
+ std::mutex mLock;
40
};
41
} // namespace o2::its
42
0 commit comments