[petsc-dev] Does some compiler require casting second argument of _mm_prefetch to enum _mm_hint?

Jed Brown jed at 59A2.org
Sat Mar 13 15:47:54 CST 2010

The Intel documentation says that the prototype should be

  void _mm_prefetch(const char*,int);

GCC uses

  void _mm_prefetch(const void*,enum _mm_hint);

The second argument is special because it has to be a compile-time
constant (it's actually part of the opcode).  I ask because I just
removed the (enum _mm_hint) in favor of (int) in Configure.py.  If we
really need to cast to the enum, then I'll have to add a third variant
to support GCC, Intel, and Clang.


More information about the petsc-dev mailing list