ATLAS's prefetch header file
ATLAS has an include file (ATLAS/include/atlas_prefetch.h),
which defines the following macros:
- ATL_GOT_L1PREFETCH: This macro is only defined if ATLAS has
a way of doing Level 1 cache prefetch for your architecture.
- ATL_pfl1R(mem) This macro prefetches the address pointed at
by mem. It prefetches one cacheline into L1. The cacheline length
will vary by platform, and the include file does not define it at this
time (so sue me). This prefetch is optimized for read access. If your
system does not possess level 1 prefetch, this macro will define to nothing
(i.e., it will not be an error to call it).
- ATL_pfl1W(mem) This macro prefetches the address pointed at
by mem. It prefetches one cacheline into L1. The cacheline length
will vary by platform, and the include file does not define it at this
time (so sue me). This prefetch is optimized for write access. If your
system does not possess level 1 prefetch, this macro will define to nothing
(i.e., it will not be an error to call it).
These prefetch instructions are not the same as user read, and do not
cause access errors (i.e., you can prefetch the NULL pointer).
Clint Whaley
2012-07-10