This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compiling with pgcpp

Tags: None
(comma "," separated)
jgahm
Registered Member
Posts
1
Karma
0

Compiling with pgcpp

Tue Sep 22, 2015 9:41 pm
Hello,

I was trying to compile just a simple code using Eigen/Core on linux, but g++ worked but pgcpp didn't. Please see the following code and error log, and let me know your thoughts. I would appreciate your help!

#include <Eigen/Core>
#include <iostream>
int main(){
Eigen::Matrix3f m3;
m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
Eigen::Vector4i v4(1, 2, 3, 4);
std::cout << "m3\n" << m3 << "\nv4:\n" << v4 << std::endl;
}


-bash-4.1$ pgcpp test.cpp -o test -I../

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 132: error: identifier
"_mm_castsi128_ps" is undefined
const Packet4f mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x80000000,0x80000000,0x80000000));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 137: error: identifier
"_mm_castsi128_pd" is undefined
const Packet2d mask = _mm_castsi128_pd(_mm_setr_epi32(0x0,0x80000000,0x0,0x80000000));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 157: error: identifier
"_mm_castsi128_ps" is undefined
return vec4i_swizzle1(
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 157: error: identifier
"_mm_castps_si128" is undefined
return vec4i_swizzle1(
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 170: warning: controlling
expression is constant
{ eigen_assert(false && "packet integer division are not supported by SSE");
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 267: error: identifier
"_mm_castpd_ps" is undefined
return _mm_castpd_ps(res);
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 291: error: identifier
"_mm_castpd_si128" is undefined
return _mm_castpd_si128(res);
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 298: error: identifier
"_mm_castpd_ps" is undefined
return vec4f_swizzle1(_mm_castpd_ps(_mm_load_sd(reinterpret_cast<const double*>(from))), 0, 0, 1, 1);
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 298: error: identifier
"_mm_castps_si128" is undefined
return vec4f_swizzle1(_mm_castpd_ps(_mm_load_sd(reinterpret_cast<const double*>(from))), 0, 0, 1, 1);
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 298: error: identifier
"_mm_castsi128_ps" is undefined
return vec4f_swizzle1(_mm_castpd_ps(_mm_load_sd(reinterpret_cast<const double*>(from))), 0, 0, 1, 1);
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 318: error: identifier
"_mm_castps_pd" is undefined
template<> EIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet4f& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu(reinterpret_cast<double*>(to), _mm_castps_pd(from)); }
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 319: error: identifier
"_mm_castsi128_pd" is undefined
template<> EIGEN_STRONG_INLINE void pstoreu<int>(int* to, const Packet4i& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu(reinterpret_cast<double*>(to), _mm_castsi128_pd(from)); }
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 325: error: identifier
"_mm_castps_si128" is undefined
pstore(to, vec4f_swizzle1(pa,0,0,0,0));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 325: error: identifier
"_mm_castsi128_ps" is undefined
pstore(to, vec4f_swizzle1(pa,0,0,0,0));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 331: error: identifier
"_mm_castpd_si128" is undefined
pstore(to, vec2d_swizzle1(pa,0,0));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 331: error: identifier
"_mm_castsi128_pd" is undefined
pstore(to, vec2d_swizzle1(pa,0,0));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 350: error: identifier
"_mm_cvtss_f32" is undefined
template<> EIGEN_STRONG_INLINE float pfirst<Packet4f>(const Packet4f& a) { return _mm_cvtss_f32(a); }
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 351: error: identifier
"_mm_cvtsd_f64" is undefined
template<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { return _mm_cvtsd_f64(a); }
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 365: error: identifier
"_mm_castsi128_ps" is undefined
const Packet4f mask = _mm_castsi128_ps(_mm_setr_epi32(0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 370: error: identifier
"_mm_castsi128_pd" is undefined
const Packet2d mask = _mm_castsi128_pd(_mm_setr_epi32(0xFFFFFFFF,0x7FFFFFFF,0xFFFFFFFF,0x7FFFFFFF));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 385: error: identifier
"_mm_castps_si128" is undefined
vecs[1] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0x55));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 385: error: identifier
"_mm_castsi128_ps" is undefined
vecs[1] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0x55));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 386: error: identifier
"_mm_castps_si128" is undefined
vecs[2] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0xAA));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 387: error: identifier
"_mm_castps_si128" is undefined
vecs[3] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0xFF));
^

"../Eigen/src/Core/arch/SSE/PacketMath.h", line 388: error: identifier
"_mm_castps_si128" is undefined
vecs[0] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0x00));
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 30: error: identifier
"_mm_castsi128_ps" is undefined
_EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inv_mant_mask, ~0x7f800000);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 59: error: identifier
"_mm_castps_si128" is undefined
emm0 = _mm_srli_epi32(_mm_castps_si128(x), 23);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 169: error: identifier
"_mm_castsi128_ps" is undefined
return pmax(pmul(y, Packet4f(_mm_castsi128_ps(emm0))), _x);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 169: error: no instance of
function template "Eigen::internal::pmul" matches the argument list
argument types are: (Eigen::internal::Packet4f, <error-type>)
return pmax(pmul(y, Packet4f(_mm_castsi128_ps(emm0))), _x);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 169: error: no instance of
function template "Eigen::internal::pmax" matches the argument list
argument types are: (<error-type>, const Eigen::internal::Packet4f)
return pmax(pmul(y, Packet4f(_mm_castsi128_ps(emm0))), _x);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 242: error: identifier
"_mm_castsi128_pd" is undefined
return pmax(pmul(x, Packet2d(_mm_castsi128_pd(emm0))), _x);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 242: error: no instance of
function template "Eigen::internal::pmul" matches the argument list
argument types are: (Eigen::internal::Packet2d, <error-type>)
return pmax(pmul(x, Packet2d(_mm_castsi128_pd(emm0))), _x);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 242: error: no instance of
function template "Eigen::internal::pmax" matches the argument list
argument types are: (<error-type>, const Eigen::internal::Packet2d)
return pmax(pmul(x, Packet2d(_mm_castsi128_pd(emm0))), _x);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 269: error: identifier
"_mm_castsi128_ps" is undefined
_EIGEN_DECLARE_CONST_Packet4f_FROM_INT(sign_mask, 0x80000000);
^

"../Eigen/src/Core/arch/SSE/MathFunctions.h", line 405: error: identifier
"_mm_castsi128_ps" is undefined
Packet4f sign_bit = _mm_castsi128_ps(emm0);
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 52: error: identifier
"_mm_castsi128_ps" is undefined
const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x80000000,0x80000000,0x80000000));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 57: error: identifier
"_mm_castsi128_ps" is undefined
const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 67: error: identifier
"_mm_castps_si128" is undefined
vec4f_swizzle1(b.v, 1, 0, 3, 2))));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 67: error: identifier
"_mm_castsi128_ps" is undefined
vec4f_swizzle1(b.v, 1, 0, 3, 2))));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 127: error: identifier
"_mm_castps_pd" is undefined
template<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) { return Packet2cf(_mm_castpd_ps(preverse(_mm_castps_pd(a.v)))); }
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 127: error: identifier
"_mm_castpd_ps" is undefined
template<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) { return Packet2cf(_mm_castpd_ps(preverse(_mm_castps_pd(a.v)))); }
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 234: error: identifier
"_mm_castps_si128" is undefined
return Packet2cf(_mm_div_ps(res.v,_mm_add_ps(s,_mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(s), 0xb1)))));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 234: error: identifier
"_mm_castsi128_ps" is undefined
return Packet2cf(_mm_div_ps(res.v,_mm_add_ps(s,_mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(s), 0xb1)))));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 239: error: identifier
"_mm_castps_si128" is undefined
return Packet2cf(vec4f_swizzle1(x.v, 1, 0, 3, 2));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 239: error: identifier
"_mm_castsi128_ps" is undefined
return Packet2cf(vec4f_swizzle1(x.v, 1, 0, 3, 2));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 279: error: identifier
"_mm_castsi128_pd" is undefined
const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 287: error: identifier
"_mm_castpd_si128" is undefined
return Packet1cd(_mm_addsub_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 0, 0), b.v),
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 287: error: identifier
"_mm_castsi128_pd" is undefined
return Packet1cd(_mm_addsub_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 0, 0), b.v),
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 288: error: identifier
"_mm_castpd_si128" is undefined
_mm_mul_pd(vec2d_swizzle1(a.v, 1, 1),
^

"../Eigen/src/Core/arch/SSE/Complex.h", line 289: error: identifier
"_mm_castpd_si128" is undefined
vec2d_swizzle1(b.v, 1, 0))));
^

"../Eigen/src/Core/products/Parallelizer.h", line 20: warning: variable
"m_maxThreads" was set but never used
static EIGEN_UNUSED int m_maxThreads = -1;
^

"../Eigen/src/Core/CommaInitializer.h", line 65: warning: controlling
expression is constant
eigen_assert(m_row<m_xpr.rows()
^
detected during instantiation of "Eigen::CommaInitializer<XprType>
&Eigen::CommaInitializer<XprType>::operator,(const
Eigen::CommaInitializer<XprType>::Scalar &) [with
XprType=Eigen::Matrix<float, 3, 3, 0, 3, 3>]"

"../Eigen/src/Core/CommaInitializer.h", line 68: warning: controlling
expression is constant
eigen_assert(m_col<m_xpr.cols()
^
detected during instantiation of "Eigen::CommaInitializer<XprType>
&Eigen::CommaInitializer<XprType>::operator,(const
Eigen::CommaInitializer<XprType>::Scalar &) [with
XprType=Eigen::Matrix<float, 3, 3, 0, 3, 3>]"

"../Eigen/src/Core/CommaInitializer.h", line 104: warning: controlling
expression is constant
eigen_assert((m_row+m_currentBlockRows) == m_xpr.rows()
^
detected during instantiation of
"Eigen::CommaInitializer<XprType>::~CommaInitializer()
[with XprType=Eigen::Matrix<float, 3, 3, 0, 3, 3>]"

"../Eigen/src/Core/DenseStorage.h", line 86: warning: controlling expression
is constant
EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(0xf);
^
detected during:
instantiation of "Eigen::internal::plain_array<T, Size,
MatrixOrArrayOptions, 16>::plain_array() [with
T=Eigen::PlainObjectBase<Eigen::Matrix<int, 4, 1, 0, 4,
1>>::Scalar, Size=4, MatrixOrArrayOptions=0]" at line 125
instantiation of "Eigen::DenseStorage<T, Size, _Rows, _Cols,
_Options>::DenseStorage() [with
T=Eigen::PlainObjectBase<Eigen::Matrix<int, 4, 1, 0, 4,
1>>::Scalar, Size=4, _Rows=4, _Cols=1, _Options=0]" at
line 425 of "../Eigen/src/Core/PlainObjectBase.h"
instantiation of
"Eigen::PlainObjectBase<Derived>::PlainObjectBase()
[with Derived=Eigen::Matrix<int, 4, 1, 0, 4, 1>]" at
line 259 of "../Eigen/src/Core/Matrix.h"
instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options,
_MaxRows, _MaxCols>::Matrix(const Eigen::Matrix<_Scalar,
_Rows, _Cols, _Options, _MaxRows, _MaxCols>::Scalar &,
const Eigen::Matrix<_Scalar, _Rows, _Cols, _Options,
_MaxRows, _MaxCols>::Scalar &, const
Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows,
_MaxCols>::Scalar &, const Eigen::Matrix<_Scalar, _Rows,
_Cols, _Options, _MaxRows, _MaxCols>::Scalar &) [with
_Scalar=int, _Rows=4, _Cols=1, _Options=0, _MaxRows=4,
_MaxCols=1]"

49 errors detected in the compilation of "test.cpp".
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Compiling with pgcpp

Sat Sep 26, 2015 8:43 pm
Looks like pgcpp does not like SIMD intrinsics. You can disable SIMD vectorization with -DEIGEN_DONT_VECTORIZE.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar