1
1

Having access to the full power of the prefetch is way more interesting. There

are 3 arguments: the pointer to the memory location to prefetch, the type of
operation that will be done on the memory (read or write) and the expected
locality.

This commit was SVN r10294.
Этот коммит содержится в:
George Bosilca 2006-06-11 20:10:36 +00:00
родитель 386a02d2ae
Коммит 85b60cf2bd
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -174,7 +174,7 @@ AC_DEFUN([OMPI_SETUP_CC],[
[ompi_cv_cc_supports___builtin_prefetch],
[AC_TRY_COMPILE([],
[int ptr;
__builtin_prefetch(&ptr);],
__builtin_prefetch(&ptr,0,0);],
[ompi_cv_cc_supports___builtin_prefetch="yes"],
[ompi_cv_cc_supports___builtin_prefetch="no"])])
if test "$ompi_cv_cc_supports___builtin_prefetch" = "yes" ; then

Просмотреть файл

@ -159,7 +159,7 @@ AC_DEFUN([OMPI_SETUP_CXX],[
[ompi_cv_cxx_supports___builtin_prefetch],
[AC_TRY_COMPILE([],
[int ptr;
__builtin_prefetch(&ptr);],
__builtin_prefetch(&ptr,0,0);],
[ompi_cv_cxx_supports___builtin_prefetch="yes"],
[ompi_cv_cxx_supports___builtin_prefetch="no"])])
if test "$ompi_cv_cxx_supports___builtin_prefetch" = "yes" ; then

Просмотреть файл

@ -31,9 +31,9 @@
#endif
#if OMPI_CXX_HAVE_BUILTIN_PREFETCH
#define OPAL_PREFETCH(address) __builtin_prefetch(address)
#define OPAL_PREFETCH(address,rw,locality) __builtin_prefetch(address,rw,locality)
#else
#define OPAL_PREFETCH(address)
#define OPAL_PREFETCH(address,rw,locality)
#endif
#else
@ -48,9 +48,9 @@
#endif
#if OMPI_C_HAVE_BUILTIN_PREFETCH
#define OPAL_PREFETCH(address) __builtin_prefetch(address)
#define OPAL_PREFETCH(address,rw,locality) __builtin_prefetch(address,rw,locality)
#else
#define OPAL_PREFETCH(address)
#define OPAL_PREFETCH(address,rw,locality)
#endif
#endif