Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
include
hebi
Eigen
Eigen
src
Core
arch
AVX
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
{
22
VectorizedCast
= 0,
23
SrcCoeffRatio
= 1,
24
TgtCoeffRatio
= 1
25
};
26
};
27
28
template
<>
29
struct
type_casting_traits
<int, float> {
30
enum
{
31
VectorizedCast
= 0,
32
SrcCoeffRatio
= 1,
33
TgtCoeffRatio
= 1
34
};
35
};
36
37
38
39
template
<>
EIGEN_STRONG_INLINE
Packet8i
pcast<Packet8f, Packet8i>
(
const
Packet8f
& a) {
40
return
_mm256_cvtps_epi32(a);
41
}
42
43
template
<>
EIGEN_STRONG_INLINE
Packet8f
pcast<Packet8i, Packet8f>
(
const
Packet8i
& a) {
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
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition:
Macros.h:493
Eigen::internal::type_casting_traits::SrcCoeffRatio
Definition:
GenericPacketMath.h:125
Eigen
Definition:
LDLT.h:16
Eigen::internal::type_casting_traits::VectorizedCast
Definition:
GenericPacketMath.h:124
Eigen::internal::Packet8f
__m256 Packet8f
Definition:
AVX/PacketMath.h:31
Eigen::internal::pcast< Packet8i, Packet8f >
EIGEN_STRONG_INLINE Packet8f pcast< Packet8i, Packet8f >(const Packet8i &a)
Definition:
AVX/TypeCasting.h:43
Eigen::internal::Packet8i
__vector short int Packet8i
Definition:
AltiVec/PacketMath.h:38
Eigen::internal::type_casting_traits::TgtCoeffRatio
Definition:
GenericPacketMath.h:126
Eigen::internal::type_casting_traits
Definition:
GenericPacketMath.h:122
Eigen::internal::pcast< Packet8f, Packet8i >
EIGEN_STRONG_INLINE Packet8i pcast< Packet8f, Packet8i >(const Packet8f &a)
Definition:
AVX/TypeCasting.h:39
internal
Definition:
Eigen_Colamd.h:50
hebiros
Author(s): Xavier Artache
, Matthew Tesch
autogenerated on Thu Sep 3 2020 04:09:45