Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Base/GPUReconstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class GPUReconstruction
void* mGPULib;
void* mGPUEntry;
};
static std::shared_ptr<LibraryLoader> sLibCUDA, sLibHIP, sLibOCL;
static std::shared_ptr<LibraryLoader> sLibCUDA, sLibHIP, sLibOCL, sLibMETAL;

// Debugging
struct debugInternal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
#cmakedefine CUDA_ENABLED
#cmakedefine HIP_ENABLED
#cmakedefine OPENCL_ENABLED
#cmakedefine METAL_ENABLED
#cmakedefine GPUCA_COMPILER_VERSIONS @GPUCA_COMPILER_VERSIONS@
// clang-format on
5 changes: 5 additions & 0 deletions GPU/GPUTracking/Base/GPUReconstructionLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ std::shared_ptr<GPUReconstruction::LibraryLoader>* GPUReconstruction::GetLibrary
} else if (type == DeviceType::OCL) {
#ifdef OPENCL_ENABLED
return &sLibOCL;
#endif
} else if (type == DeviceType::METAL) {
#ifdef METAL_ENABLED
return &sLibMETAL;
#endif
} else {
GPUError("Error: Invalid device type %u", (uint32_t)type);
Expand All @@ -125,6 +129,7 @@ GPUReconstruction* GPUReconstruction::CreateInstance(const char* type, bool forc
std::shared_ptr<GPUReconstruction::LibraryLoader> GPUReconstruction::sLibCUDA(new GPUReconstruction::LibraryLoader("lib" LIBRARY_PREFIX "GPUTrackingCUDA" LIBRARY_EXTENSION, "GPUReconstruction_Create_CUDA"));
std::shared_ptr<GPUReconstruction::LibraryLoader> GPUReconstruction::sLibHIP(new GPUReconstruction::LibraryLoader("lib" LIBRARY_PREFIX "GPUTrackingHIP" LIBRARY_EXTENSION, "GPUReconstruction_Create_HIP"));
std::shared_ptr<GPUReconstruction::LibraryLoader> GPUReconstruction::sLibOCL(new GPUReconstruction::LibraryLoader("lib" LIBRARY_PREFIX "GPUTrackingOCL" LIBRARY_EXTENSION, "GPUReconstruction_Create_OCL"));
std::shared_ptr<GPUReconstruction::LibraryLoader> GPUReconstruction::sLibMETAL(new GPUReconstruction::LibraryLoader("lib" LIBRARY_PREFIX "GPUTrackingMETAL" LIBRARY_EXTENSION, "GPUReconstruction_Create_METAL"));

GPUReconstruction::LibraryLoader::LibraryLoader(const char* lib, const char* func) : mLibName(lib), mFuncName(func), mGPULib(nullptr), mGPUEntry(nullptr) {}

Expand Down