mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-23 14:53:13 +08:00
Fix some trivial C++11 vs C++03 compatibility warnings
This commit is contained in:
parent
42123ff38b
commit
b1653d1599
@ -62,7 +62,7 @@ struct cond<RowMajor> {
|
|||||||
*/
|
*/
|
||||||
enum TensorBlockShapeType {
|
enum TensorBlockShapeType {
|
||||||
kUniformAllDims,
|
kUniformAllDims,
|
||||||
kSkewedInnerDims,
|
kSkewedInnerDims
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TensorOpResourceRequirements {
|
struct TensorOpResourceRequirements {
|
||||||
|
@ -105,7 +105,7 @@ struct TensorEvaluator<const TensorBroadcastingOp<Broadcast, ArgType>, Device>
|
|||||||
typedef typename XprType::CoeffReturnType CoeffReturnType;
|
typedef typename XprType::CoeffReturnType CoeffReturnType;
|
||||||
typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;
|
typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;
|
||||||
static const int PacketSize = PacketType<CoeffReturnType, Device>::size;
|
static const int PacketSize = PacketType<CoeffReturnType, Device>::size;
|
||||||
bool isCopy= false, nByOne = false, oneByN = false;
|
bool isCopy, nByOne, oneByN;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
IsAligned = true,
|
IsAligned = true,
|
||||||
@ -116,7 +116,7 @@ struct TensorEvaluator<const TensorBroadcastingOp<Broadcast, ArgType>, Device>
|
|||||||
};
|
};
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||||
: m_broadcast(op.broadcast()),m_impl(op.expression(), device)
|
: isCopy(false), nByOne(false), oneByN(false), m_broadcast(op.broadcast()),m_impl(op.expression(), device)
|
||||||
{
|
{
|
||||||
// The broadcasting op doesn't change the rank of the tensor. One can't broadcast a scalar
|
// The broadcasting op doesn't change the rank of the tensor. One can't broadcast a scalar
|
||||||
// and store the result in a scalar. Instead one should reshape the scalar into a a N-D
|
// and store the result in a scalar. Instead one should reshape the scalar into a a N-D
|
||||||
|
@ -207,16 +207,16 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T& array_get(const array<T,N>& a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T, std::size_t N> struct array_size<array<T,N> > {
|
template<class T, std::size_t N> struct array_size<array<T,N> > {
|
||||||
static const size_t value = N;
|
enum { value = N };
|
||||||
};
|
};
|
||||||
template<class T, std::size_t N> struct array_size<array<T,N>& > {
|
template<class T, std::size_t N> struct array_size<array<T,N>& > {
|
||||||
static const size_t value = N;
|
enum { value = N };
|
||||||
};
|
};
|
||||||
template<class T, std::size_t N> struct array_size<const array<T,N> > {
|
template<class T, std::size_t N> struct array_size<const array<T,N> > {
|
||||||
static const size_t value = N;
|
enum { value = N };
|
||||||
};
|
};
|
||||||
template<class T, std::size_t N> struct array_size<const array<T,N>& > {
|
template<class T, std::size_t N> struct array_size<const array<T,N>& > {
|
||||||
static const size_t value = N;
|
enum { value = N };
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user