| 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, |
nothing calls this directly
no test coverage detected