Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /acts/Python/Plugins/src/Hashing.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "ActsPlugins/Hashing/HashingAlgorithmConfig.hpp"
0010 #include "ActsPlugins/Hashing/HashingTrainingConfig.hpp"
0011 #include "ActsPython/Utilities/Helpers.hpp"
0012 #include "ActsPython/Utilities/Macros.hpp"
0013 
0014 #include <memory>
0015 #include <string>
0016 
0017 #include <pybind11/pybind11.h>
0018 
0019 namespace py = pybind11;
0020 using namespace pybind11::literals;
0021 
0022 PYBIND11_MODULE(ActsPluginsPythonBindingsHashing, hashing) {
0023   using namespace ActsPlugins;
0024   using namespace ActsPython;
0025 
0026   {
0027     using Config = HashingAlgorithmConfig;
0028     auto c =
0029         py::class_<Config>(hashing, "HashingAlgorithmConfig").def(py::init<>());
0030     ACTS_PYTHON_STRUCT(c, bucketSize, zBins, phiBins);
0031     patchKwargsConstructor(c);
0032   }
0033 
0034   {
0035     using Config = HashingTrainingConfig;
0036     auto c =
0037         py::class_<Config>(hashing, "HashingTrainingConfig").def(py::init<>());
0038     ACTS_PYTHON_STRUCT(c, annoySeed, f);
0039     patchKwargsConstructor(c);
0040   }
0041 }