ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
vc_soa.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 "algebra/impl/vc_aos_approximately_equal.hpp"
13#include "algebra/impl/vc_soa_boolean.hpp"
14#include "algebra/impl/vc_soa_casts.hpp"
15#include "algebra/impl/vc_soa_getter.hpp"
16#include "algebra/impl/vc_soa_math.hpp"
17#include "algebra/impl/vc_soa_matrix.hpp"
18#include "algebra/impl/vc_soa_types.hpp"
19#include "algebra/impl/vc_soa_vector.hpp"
20#include "detray/algebra/generic/impl/generic_matrix.hpp"
21
22// System include(s).
23#include <cassert>
24#include <type_traits>
25
26namespace detray {
27
30
35using algebra::storage::operator*;
40using algebra::storage::operator/;
45using algebra::storage::operator-;
50using algebra::storage::operator+;
51
53
56template <concepts::value V>
57struct vc_soa {
59 using value_type = V;
60
62 template <concepts::element T>
63 using simd = Vc::Vector<T>;
64
66 using boolean = Vc::Mask<V>;
67
72 using index_type = algebra::vc_soa::index_type;
74 using transform3D = algebra::vc_soa::transform3<value_type>;
76 using point2D = algebra::vc_soa::point2<value_type>;
78 using point3D = algebra::vc_soa::point3<value_type>;
80 using vector2D = algebra::vc_soa::vector2<value_type>;
82 using vector3D = algebra::vc_soa::vector3<value_type>;
83
85 template <std::size_t ROWS, std::size_t COLS>
87 using matrix = algebra::vc_soa::matrix_type<value_type, ROWS, COLS>;
89};
90
91
92namespace getter {
93
96
97using algebra::vc_soa::storage::block;
98using algebra::vc_soa::storage::element;
99using algebra::vc_soa::storage::set_block;
100using algebra::vc_soa::storage::vector;
101
103
104} // namespace getter
105
106namespace vector {
107
110
111using algebra::vc_soa::math::cross;
112using algebra::vc_soa::math::dot;
113using algebra::vc_soa::math::eta;
114using algebra::vc_soa::math::norm;
115using algebra::vc_soa::math::normalize;
116using algebra::vc_soa::math::perp;
117using algebra::vc_soa::math::phi;
118using algebra::vc_soa::math::theta;
119
121
122} // namespace vector
123
124// Produces clash with matrix typedefs in other plugins
125namespace matrix {
126
127using algebra::vc_soa::math::determinant;
128using algebra::vc_soa::math::identity;
129using algebra::vc_soa::math::inverse;
130using algebra::vc_soa::math::set_identity;
131using algebra::vc_soa::math::set_zero;
132using algebra::vc_soa::math::transpose;
133using algebra::vc_soa::math::zero;
134
135using algebra::generic::math::cholesky_decomposition;
136using algebra::generic::math::column_wise_cross;
137using algebra::generic::math::column_wise_multiply;
138using algebra::generic::math::cross_matrix;
139using algebra::generic::math::outer_product;
140using algebra::generic::math::set_inplace_product_left;
141using algebra::generic::math::set_inplace_product_left_transpose;
142using algebra::generic::math::set_inplace_product_right;
143using algebra::generic::math::set_inplace_product_right_transpose;
144using algebra::generic::math::set_product;
145using algebra::generic::math::set_product_left_transpose;
146using algebra::generic::math::set_product_right_transpose;
147using algebra::generic::math::transposed_product;
148
149} // namespace matrix
150
151} // namespace detray
Detray include(s).
Definition array_operators.hpp:18
Define the plugin types.
Definition vc_soa.hpp:57
simd< value_type > scalar
Linear Algebra type definitions.
Definition vc_soa.hpp:70
algebra::vc_soa::point3< value_type > point3D
Three-dimensional point type.
Definition vc_soa.hpp:78
algebra::vc_soa::vector2< value_type > vector2D
Two-dimensional vector type.
Definition vc_soa.hpp:80
algebra::vc_soa::point2< value_type > point2D
Two-dimensional point type.
Definition vc_soa.hpp:76
algebra::vc_soa::transform3< value_type > transform3D
Three-dimensional transform type.
Definition vc_soa.hpp:74
Vc::Vector< T > simd
Backend vectorized representation of an element type.
Definition vc_soa.hpp:63
algebra::vc_soa::vector3< value_type > vector3D
Three-dimensional vector type.
Definition vc_soa.hpp:82
algebra::vc_soa::index_type index_type
Index type used for matrix and vector access.
Definition vc_soa.hpp:72
V value_type
Define scalar precision.
Definition vc_soa.hpp:59
algebra::vc_soa::matrix_type< value_type, ROWS, COLS > matrix
Fixed-size matrix type with the requested dimensions.
Definition vc_soa.hpp:87
Vc::Mask< V > boolean
Boolean type used for element-wise predicates.
Definition vc_soa.hpp:66