ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
vc_soa_boolean.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/boolean.hpp"
13
14// Vc include(s).
15#ifdef _MSC_VER
16#pragma warning(push, 0)
17#endif // MSVC
18#include <Vc/Vc>
19#ifdef _MSC_VER
20#pragma warning(pop)
21#endif // MSVC
22
23namespace detray::algebra::boolean {
24
27using algebra::boolean::all_of;
28using algebra::boolean::any_of;
29using algebra::boolean::none_of;
31
34template <typename T>
35 requires Vc::Traits::is_simd_mask<T>::value
36constexpr bool any_of(T &&mask) {
37 return Vc::any_of(std::forward<T>(mask));
38}
39
40template <typename T>
41 requires Vc::Traits::is_simd_mask<T>::value
42constexpr bool all_of(T &&mask) {
43 return Vc::all_of(std::forward<T>(mask));
44}
45
46template <typename T>
47 requires Vc::Traits::is_simd_mask<T>::value
48constexpr bool none_of(T &&mask) {
49 return Vc::none_of(std::forward<T>(mask));
50}
52
53} // namespace detray::algebra::boolean