clang_delta 2.1.0
Git version: 12f63c4
--
Regards,
Konstantin
typedef __typeof__ 0 ptrdiff_t;
class basic_string
;
struct numeric_limits;
typedef int __m128i __attribute__ ( ( __vector_size__ ( 16 ) ) );
__m128i __attribute__ ( ( __always_inline__ ) ) _mm_abs_epi32 ( __m128i a )
{
return __builtin_ia32_pabsd128 ( a );
}
enum
{
DefaultTraversal, LinearTraversal,
LinearVectorizedTraversal
};
enum
{
ReadOnlyAccessors, WriteAccessors
};
template < typename > struct traits;
template < typename Derived > struct accessors_level
{
enum
{ has_write_access = traits < Derived >::Flags ? : 0, value = 0 ? : 1 ? : 0
};
};
template < typename > struct EigenBase;
template < typename > class DenseBase;
template < typename Derived, int =
accessors_level < Derived >::value > class DenseCoeffsBase;
template < typename, int, int, int = 0 ? : 0, int = 0, int = 0 > class Matrix;
template < typename > class MatrixBase;
template < typename, typename > class CwiseNullaryOp;
template < typename, typename > class CwiseUnaryOp;
template < typename > class Cwise;
struct is_same
;
template < typename > struct remove_reference;
template < typename T > struct remove_all
{
typedef T type;
};
struct is_arithmetic
{
enum
{ value };
};
template < typename > struct functor_traits;
template < typename > struct packet_traits;
template < typename > struct unpacket_traits;
template < typename Scalar > class compute_matrix_flags
{
enum
{ aligned_bit = 0, packet_access_bit =
packet_traits < Scalar >::Vectorizable ? 8 : 0
};
public:enum
{ ret = packet_access_bit };
};
struct size_at_compile_time
{
enum
{ ret = 0 ? : 0 };
};
template < typename T > struct nested
{
typedef T type;
};
template < typename Derived > struct dense_xpr_base
{
typedef MatrixBase < Derived > type;
};
template < typename Derived > struct special_scalar_op_base:DenseCoeffsBase <
Derived >
{
void operator* ( );
};
template < typename > struct GenericNumTraits
{
enum
{ IsSigned = is_arithmetic::value ? : 0, MulCost
};
};
template < typename Packet > Packet pload ( const typename unpacket_traits <
Packet >::type * );
template < typename Packet, int >inline Packet
ploadt ( typename unpacket_traits < Packet >::type * from )
{
return pload < Packet > ( from );
}
typedef __m128i Packet4i;
template <> struct packet_traits <int >
{
typedef Packet4i type;
enum
{ Vectorizable = 1, AlignedOnScalar, size };
};
template <> struct unpacket_traits <Packet4i >
{
typedef int type;
};
template <> inline Packet4i pload ( const int *from )
{
return *reinterpret_cast < const Packet4i *>( from );
}
inline Packet4i
pabs ( const Packet4i & a )
{
return _mm_abs_epi32 ( a );
}
template < typename > struct scalar_abs_op
{
template < typename Packet > Packet packetOp ( const Packet & a )
{
return pabs ( a );
}
};
struct functor_has_linear_access
{
enum
{ ret };
};
template < typename Derived > class DenseCoeffsBase < Derived, 0 >:public EigenBase <
Derived >
{
public:typename traits < Derived >::StorageKind;
typedef typename traits < Derived >::Scalar Scalar;
typedef typename packet_traits < Scalar >::type PacketScalar;
};
template < typename Derived > class DenseCoeffsBase < Derived, 1 >:public DenseCoeffsBase < Derived, 0
>
{
public:typedef DenseCoeffsBase < Derived > Base;
typedef typename traits < Derived >::Index Index;
Base::derived;
template < typename OtherDerived, int StoreMode,
int LoadMode > void copyPacket ( Index,
DenseBase < OtherDerived > &other )
{
derived ( ).template writePacket < 0 > ( 0,
other.
derived ( ).template packet <
0 > ( 0 ) );
}
};
template < typename > struct inner_stride_at_compile_time;
template < typename Derived > struct outer_stride_at_compile_time
{
enum
{ ret = traits < Derived >::OuterStrideAtCompileTime };
};
template < typename Derived > class DenseBase:public special_scalar_op_base <
Derived >
{
public:special_scalar_op_base < Derived >::operator*;
typedef typename traits < Derived >::Index Index;
enum
{ RowsAtCompileTime =
size_at_compile_time::ret, IsVectorAtCompileTime =
traits < Derived >::MaxRowsAtCompileTime
|| traits < Derived >::MaxColsAtCompileTime, Flags =
traits < Derived >::Flags, InnerSizeAtCompileTime =
outer_stride_at_compile_time < Derived >::ret
};
template < typename OtherDerived > Derived & lazyAssign ( const DenseBase <
OtherDerived >
& );
static CwiseNullaryOp < int, Derived > Random ( Index, Index );
};
template < typename Derived > class MatrixBase:public DenseBase < Derived >
{
public:;
Cwise < Derived > cwise ( );
};
template < typename Derived > struct EigenBase
{
Derived & derived ( );
};
template < typename Derived, typename OtherDerived > struct assign_traits
{
enum
{ DstIsAligned = Derived::Flags, DstHasDirectAccess =
Derived::Flags, SrcIsAligned = OtherDerived::Flags, JointAlignment =
packet_traits < typename Derived::Scalar >::size
};
enum
{ StorageOrdersAgree = 0, MightVectorize =
OtherDerived::Flags, MayInnerVectorize = 0, MayLinearVectorize =
MightVectorize, MaySliceVectorize = 0
};
enum
{ Traversal =
0 ? : MayLinearVectorize ? LinearVectorizedTraversal : 0 ? : 1 ? : 0
};
;
};
template < typename Derived1, typename Derived2, int assign_traits < Derived1,
Derived2 >::>struct assign_impl;
template < typename Derived1,
typename Derived2 > struct assign_impl <Derived1, Derived2, 1 >
{
static void run ( );
};
template < typename Derived1,
typename Derived2 > struct assign_impl <Derived1, Derived2,
LinearVectorizedTraversal >
{
static void run ( Derived1 & dst, Derived2 & src )
{
typedef packet_traits < typename Derived1::Scalar > PacketTraits;
enum
{ packetSize = PacketTraits::size, dstAlignment =
PacketTraits::AlignedOnScalar ? : 0, srcAlignment =
assign_traits < Derived1, Derived2 >::JointAlignment
};
dst.template copyPacket < Derived2, 0, 0 > ( 0, src );
}};
template < typename Derived > template < typename OtherDerived >
Derived & DenseBase < Derived >::lazyAssign ( const DenseBase <
OtherDerived > & )
{
;
assign_impl < Derived, OtherDerived, 1 ? assign_traits < Derived,
OtherDerived >::Traversal : 0 >::run;
}
template < typename Derived, typename OtherDerived, bool =
Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime
> struct assign_selector;
template < typename Derived, typename OtherDerived > struct assign_selector <
Derived,
OtherDerived,
0 >
{
static
Derived &
run ( Derived & dst, OtherDerived & other )
{
dst.lazyAssign ( other.derived ( ) );
}};
template < typename T > class DenseStorage
{
public:
DenseStorage ( ptrdiff_t, ptrdiff_t, ptrdiff_t );
T *
data ( ) const;
};
template < typename Derived > class PlainObjectBase:public dense_xpr_base <
Derived >::type
{
public:
typedef
typename
traits <
Derived >::Index
Index;
typedef
typename
traits <
Derived >::Scalar
Scalar;
typedef
typename
packet_traits <
Scalar >::type
PacketScalar;
DenseStorage < Scalar > m_storage;
template < int
LoadMode >
PacketScalar
packet ( Index index )
{
return ploadt < PacketScalar, 0 > ( m_storage.data ( ) + index );
}
template < int >void
writePacket ( Index, const PacketScalar & );
PlainObjectBase ( Index, Index, Index ):m_storage ( 0, 0, 0 )
{
}
template < typename OtherDerived > void
_set_noalias ( const DenseBase < OtherDerived > )
{
assign_selector < Derived, OtherDerived >::run;
}
};
template < typename _Scalar, int
_Rows, int
_Cols, int
_Options, int
_MaxRows, int
_MaxCols > struct traits <
Matrix <
_Scalar,
_Rows,
_Cols,
_Options,
_MaxRows,
_MaxCols > >
{
typedef
_Scalar
Scalar;
typedef int
StorageKind;
typedef::ptrdiff_t
Index;
enum
{
MaxRowsAtCompileTime,
MaxColsAtCompileTime = 0, Flags = compute_matrix_flags < _Scalar >::ret,
OuterStrideAtCompileTime = 0 ? : 0
};
};
template < typename _Scalar, int, int, int, int, int >
class
Matrix:
public
PlainObjectBase <
Matrix <
_Scalar,
0,
0 > >
{
public:typedef
PlainObjectBase <
Matrix >
Base;
typedef
typename
nested <
Matrix >::type
Nested;
template <
typename
T0,
typename
T1 >
Matrix ( const T0 &, const T1 & );
template <
typename
OtherDerived >
Matrix ( const MatrixBase < OtherDerived > &other ):
Base ( 0, 0, 0 )
{
Base::_set_noalias ( other );
}
};
template < typename UnaryOp, typename XprType > struct traits <
CwiseUnaryOp <
UnaryOp,
XprType > >:
traits <
XprType >
{
typedef
typename
XprType::Nested
XprTypeNested;
typename
remove_reference <
XprTypeNested >::_XprTypeNested;
};
template < typename, typename, typename > class CwiseUnaryOpImpl;
template < typename UnaryOp, typename XprType > class CwiseUnaryOp:public CwiseUnaryOpImpl < UnaryOp, XprType,
typename traits <
XprType >::StorageKind >
{
public:;
UnaryOp & functor ( );
typename
remove_all < typename XprType::Nested >::type & nestedExpression ( );
};
template < typename UnaryOp,
typename XprType > class CwiseUnaryOpImpl < UnaryOp, XprType, int >:
public
dense_xpr_base <
CwiseUnaryOp <
UnaryOp,
XprType > >::type
{
public:typedef
CwiseUnaryOp <
UnaryOp,
XprType >
Derived;
typedef
typename
dense_xpr_base <
CwiseUnaryOp <
UnaryOp,
XprType > >::type
Base;
typedef
typename
Base::PacketScalar
PacketScalar;
typedef
typename
traits <
Derived >::Index
Index;
Base::derived;
template < int
LoadMode >
PacketScalar
packet ( Index index )
{
return derived ( ).functor ( ).
packetOp ( derived ( ).nestedExpression ( ).template packet < 0 >
( index ) );
}
};
template < typename NullaryOp, typename PlainObjectType > struct traits <
CwiseNullaryOp <
NullaryOp,
PlainObjectType > >:
traits <
PlainObjectType >
{
enum
{
Flags =
traits::Flags | functor_has_linear_access::ret ? 0 : functor_traits <
NullaryOp >::IsRepeatable ? : 0, CoeffReadCost =
functor_traits < NullaryOp >::Cost
};
};
template < typename NullaryOp, typename PlainObjectType > class CwiseNullaryOp:public dense_xpr_base < CwiseNullaryOp < NullaryOp,
PlainObjectType >
>::type
{
};
template < typename Scalar > struct functor_traits
{
enum
{
Cost = GenericNumTraits < Scalar >::MulCost, IsRepeatable
};
};
template < typename ExpressionType > class Cwise
{
public:;
CwiseUnaryOp < scalar_abs_op < typename traits < ExpressionType >::Scalar >,
ExpressionType > abs ( );
};
template < typename MatrixType > void
cwiseops ( const MatrixType & )
{
MatrixType m1 = MatrixType::Random ( 0, 0 ), m3 ( 0, 0 );
m3 = m1.cwise ( ).abs ( );
}
void
test_cwiseop ( )
{
cwiseops ( Matrix < int, 0, 0 > ( 0, 0 ) );
}
// clang_delta --transformation=remove-nested-function --counter=2 cwiseop.cpp