ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
vc_aos_matrix.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 CERN for the benefit of the ACTS project
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s).
12#include "detray/algebra/common/matrix.hpp"
13#include "detray/algebra/concepts.hpp"
14#include "detray/algebra/generic/generic.hpp"
15#include "detray/definitions/detail/qualifiers.hpp"
16
17namespace detray::algebra::vc_aos::math {
18
19using algebra::storage::identity;
20using algebra::storage::set_identity;
21using algebra::storage::set_zero;
22using algebra::storage::transpose;
23using algebra::storage::zero;
24
26template <std::size_t N, concepts::value value_t,
27 template <typename, std::size_t> class array_t>
28DETRAY_HOST_DEVICE constexpr value_t determinant(
29 const algebra::storage::matrix<array_t, value_t, N, N> &m) noexcept {
30 // TODO: Implement vectorization friendly version
31 return algebra::generic::math::determinant(m);
32}
33
35template <std::size_t ROW, std::size_t COL, concepts::value value_t,
36 template <typename, std::size_t> class array_t>
37DETRAY_HOST_DEVICE constexpr algebra::storage::matrix<array_t, value_t, COL,
38 ROW>
39inverse(
40 const algebra::storage::matrix<array_t, value_t, ROW, COL> &m) noexcept {
41 // TODO: Implement vectorization friendly version
42 return algebra::generic::math::inverse(m);
43}
44
46template <std::size_t ROW, std::size_t COL, concepts::value value_t,
47 template <typename, std::size_t> class array_t>
48DETRAY_HOST_DEVICE constexpr algebra::storage::matrix<array_t, value_t, COL,
49 ROW>
50transpose(
51 const algebra::storage::matrix<array_t, value_t, ROW, COL> &m) noexcept {
52 // TODO: Implement vectorization friendly version
53 return algebra::generic::math::transpose(m);
54}
55
56} // namespace detray::algebra::vc_aos::math