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

Method CreateOnDevice

src/pycolmap/feature/extraction.cc:38–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 py::trampoline_self_life_support {
37 public:
38 static std::unique_ptr<FeatureExtractor> CreateOnDevice(
39 std::optional<FeatureExtractionOptions> options, Device device) {
40 if (options) {
41 if (options->use_gpu != IsGPU(device)) {
42 LOG(WARNING) << "FeatureExtractionOptions::use_gpu does not match "
43 "device. FeatureExtractionOptions::use_gpu is ignored.";
44 }
45 } else {
46 options = FeatureExtractionOptions();
47 }
48 options->use_gpu = IsGPU(device);
49 return THROW_CHECK_NOTNULL(FeatureExtractor::Create(*options));
50 }
51
52 bool Extract(const Bitmap& bitmap,
53 FeatureKeypoints* keypoints,

Callers

nothing calls this directly

Calls 2

IsGPUFunction · 0.85

Tested by

no test coverage detected