AVX/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) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
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_AVX_H
11 #define EIGEN_TYPE_CASTING_AVX_H
12 
13 namespace Eigen {
14 
15 namespace internal {
16 
17 // For now we use SSE to handle integers, so we can't use AVX instructions to cast
18 // from int to float
19 template <>
20 struct type_casting_traits<float, int> {
21  enum {
25  };
26 };
27 
28 template <>
29 struct type_casting_traits<int, float> {
30  enum {
34  };
35 };
36 
37 
38 
40  return _mm256_cvtps_epi32(a);
41 }
42 
44  return _mm256_cvtepi32_ps(a);
45 }
46 
47 } // end namespace internal
48 
49 } // end namespace Eigen
50 
51 #endif // EIGEN_TYPE_CASTING_AVX_H
#define EIGEN_STRONG_INLINE
Definition: Macros.h:493
Definition: LDLT.h:16
EIGEN_STRONG_INLINE Packet8f pcast< Packet8i, Packet8f >(const Packet8i &a)
__vector short int Packet8i
EIGEN_STRONG_INLINE Packet8i pcast< Packet8f, Packet8i >(const Packet8f &a)


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:09:45