Results 1 to 2 of 2

Thread: OpenCL and MinGW problems

  1. #1
    Newbie
    Join Date
    Mar 2014
    Posts
    2

    OpenCL and MinGW problems

    Hi,

    I'm using Code::Blocks IDE with MinGW and I'm having some problems with cl.hpp. When I try to compile my program I get an error because cl.hpp tries to include intrin.h which doesn't exist in MinGW, so I changed it to x86intrin.h which I believe is the MinGW equivalent of intrin.h. However, now I get an error on cl.hpp line 1041 saying that _mm_mfence was not defined in this scope. This is the line where the error is:
    Code :
    inline void fence() { _mm_mfence();}
    If I simply comment out that line and every occurence of fence() in cl.hpp it all compiles and works perfectly, but I fear that this might cause some problems in future? Is there a way to get this working properly?

    Thanks

  2. #2
    Newbie
    Join Date
    Mar 2014
    Posts
    2
    Nevermind, I just had to set compiler flag that allows sse2 instructions, and now it works as it should.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •