SVE/TypeCasting.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2020, Arm Limited and Contributors
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_TYPE_CASTING_SVE_H
11 #define EIGEN_TYPE_CASTING_SVE_H
12 
13 namespace Eigen {
14 namespace internal {
15 
16 template <>
17 struct type_casting_traits<float, numext::int32_t> {
18  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
19 };
20 
21 template <>
22 struct type_casting_traits<numext::int32_t, float> {
23  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
24 };
25 
26 template <>
27 EIGEN_STRONG_INLINE PacketXf pcast<PacketXi, PacketXf>(const PacketXi& a) {
28  return svcvt_f32_s32_z(svptrue_b32(), a);
29 }
30 
31 template <>
32 EIGEN_STRONG_INLINE PacketXi pcast<PacketXf, PacketXi>(const PacketXf& a) {
33  return svcvt_s32_f32_z(svptrue_b32(), a);
34 }
35 
36 template <>
38  return svreinterpret_f32_s32(a);
39 }
40 
41 template <>
43  return svreinterpret_s32_f32(a);
44 }
45 
46 } // namespace internal
47 } // namespace Eigen
48 
49 #endif // EIGEN_TYPE_CASTING_SVE_H
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
EIGEN_STRONG_INLINE PacketXi preinterpret< PacketXi, PacketXf >(const PacketXf &a)
EIGEN_STRONG_INLINE PacketXf pcast< PacketXi, PacketXf >(const PacketXi &a)
EIGEN_STRONG_INLINE PacketXi pcast< PacketXf, PacketXi >(const PacketXf &a)
signed int int32_t
Definition: ms_stdint.h:82
EIGEN_STRONG_INLINE PacketXf preinterpret< PacketXf, PacketXi >(const PacketXi &a)


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:39