MCPcopy Create free account
hub / github.com/colmap/colmap / IsGPU

Function IsGPU

src/pycolmap/utils.h:7–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5enum class Device { AUTO = -1, CPU = 0, CUDA = 1 };
6
7inline bool IsGPU(Device device) {
8 if (device == Device::AUTO) {
9#ifdef COLMAP_CUDA_ENABLED
10 return true;
11#else
12 return false;
13#endif
14 } else {
15 return static_cast<bool>(device);
16 }
17}
18
19typedef Eigen::Matrix<bool, Eigen::Dynamic, 1> PyInlierMask;
20

Callers 6

PYBIND11_MODULEFunction · 0.85
MatchFeaturesFunction · 0.85
ExtractFeaturesFunction · 0.85
CreateOnDeviceMethod · 0.85
CreateOnDeviceMethod · 0.85
SiftMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected