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.
Этот коммит содержится в:
родитель
386a02d2ae
Коммит
85b60cf2bd
@ -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
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user