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
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::internal::preinterpret< PacketXf, PacketXi >
EIGEN_STRONG_INLINE PacketXf preinterpret< PacketXf, PacketXi >(const PacketXi &a)
Definition: SVE/TypeCasting.h:37
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::type_casting_traits::SrcCoeffRatio
@ SrcCoeffRatio
Definition: GenericPacketMath.h:151
Eigen::internal::pcast< PacketXf, PacketXi >
EIGEN_STRONG_INLINE PacketXi pcast< PacketXf, PacketXi >(const PacketXf &a)
Definition: SVE/TypeCasting.h:32
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
Eigen::internal::preinterpret< PacketXi, PacketXf >
EIGEN_STRONG_INLINE PacketXi preinterpret< PacketXi, PacketXf >(const PacketXf &a)
Definition: SVE/TypeCasting.h:42
Eigen::internal::type_casting_traits::TgtCoeffRatio
@ TgtCoeffRatio
Definition: GenericPacketMath.h:152
Eigen::internal::pcast< PacketXi, PacketXf >
EIGEN_STRONG_INLINE PacketXf pcast< PacketXi, PacketXf >(const PacketXi &a)
Definition: SVE/TypeCasting.h:27
gtsam.examples.DogLegOptimizerExample.float
float
Definition: DogLegOptimizerExample.py:113
int32_t
signed int int32_t
Definition: ms_stdint.h:82
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::type_casting_traits::VectorizedCast
@ VectorizedCast
Definition: GenericPacketMath.h:150


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:37