Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-16 08:17:19

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 // GCC (>=12) emits a spurious -Wmaybe-uninitialized from inside Eigen's SVD
0010 // code used by setFromTwoVectors; suppress it for this translation unit.
0011 #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12
0012 #pragma GCC diagnostic push
0013 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
0014 #endif
0015 
0016 #include <Eigen/Dense>
0017 
0018 namespace Acts::detail {
0019 
0020 Eigen::Quaternion<float> quaternionFromTwoVectors(
0021     const Eigen::Matrix<float, 3, 1>& a, const Eigen::Matrix<float, 3, 1>& b) {
0022   return Eigen::Quaternion<float>().setFromTwoVectors(a, b);
0023 }
0024 
0025 }  // namespace Acts::detail
0026 
0027 #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12
0028 #pragma GCC diagnostic pop
0029 #endif