PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

_mm_cvtss_f32 support for "new[]" and "delete

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
LamCo



Joined: 25 Jun 2009
Posts: 1

PostPosted: Sun Sep 19, 2010 7:27 pm    Post subject: _mm_cvtss_f32 support for "new[]" and "delete Reply with quote

dear experts,

I've tried to use Eigen-2.0.15, compiled by pgcpp version 10.9 (Win32)

http://eigen.tuxfamily.org/index.php?title=Main_Page

with the most simple code (test.cpp) and optimization:
' –fastsse -Minform --gnu_version 4.3.4 --gnu_extensions '
________________________________________________________________________

Code:
#include <Eigen/Core>

// import most common Eigen types
USING_PART_OF_NAMESPACE_EIGEN

int main(int, char *[])
{
  Matrix3f m3;
  m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
  Matrix4f m4 = Matrix4f::Identity();
  Vector4i v4(1, 2, 3, 4);

  std::cout << "m3\n" << m3 << "\nm4:\n"
    << m4 << "\nv4:\n" << v4 << std::endl;
}


________________________________________________________________________


However such errors appeared:

PGI$ . /d/Ubuntu/compile.sh > compError
".\Eigen/src/Core/arch/SSE/PacketMath.h", line 125: error: identifier
"_mm_cvtss_f32" is undefined
template<> EIGEN_STRONG_INLINE float ei_pfirst<__m128>(const __m128& a) { float x = _mm_cvtss_f32(a); return x; }
^

".\Eigen/src/Core/Matrix.h", line 144: error: support for "new[]" and
"delete[]" is disabled

EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
^

2 errors detected in the compilation of "test.cpp".


I cross-checked with g++ 4.2.4 (Ubuntu) as well, and there was no compile error and the test was okay. However,


For error (1):
I've looked around
xx:\Program Files\PGI\win32\10.9\include\emmintrin.h
xx:\Program Files\PGI\win32\10.9\include\xmmintrin.h

and PGI User Guide, it seems that function _mm_cvtss_f32 does not exist at all.

Will it be possible to emulate it as :

Code:
xxx _mm_cvtss_f32(__m128 _a){
   __m128d t;
   t = _mm_cvtps_pd(_a);   
   float  x=0.0;
   x = (double)_mm_cvtsd_f64(t);
   return x;
}


For error (2):

Although I've used flags "--gnu_version 4.3.4 --gnu_extensions", the compilation error remains.
Your helps are very appreciated...

best regards,
LamCo
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group