mirror of
https://github.com/paboyle/Grid.git
synced 2025-07-28 18:27:07 +01:00
benchmarks
extras
gcc-bug-report
include
lib
algorithms
allocator
cartesian
communicator
cshift
json
lattice
log
parallelIO
perfmon
pugixml
qcd
serialisation
simd
.dirstamp
BGQQPX.h
Grid_avx.h
Grid_avx512.h
Grid_generic.h
Grid_generic_types.h
Grid_imci.h
Grid_neon.h
Grid_qpx.h
Grid_sse4.h
Grid_vector_types.h
Grid_vector_unops.h
IBM_qpx.h
IBM_qpx_double.h
IBM_qpx_single.h
Intel512avx.h
Intel512common.h
Intel512double.h
Intel512imci.h
Intel512single.h
Intel512wilson.h
Simd.h
l1p.h
sitmo_rng
stencil
tensors
threads
util
.dirstamp
DisableWarnings.h
Grid.h
GridCore.h
GridQCDcore.h
GridStd.h
Grid_Eigen_Dense.h
Hadrons
Makefile.am
m4
prerequisites
scripts
tests
.gitignore
.travis.yml
AUTHORS
COPYING
ChangeLog
LICENSE
Makefile.am
NEWS
README
README.md
TODO
VERSION
bootstrap.sh
configure.ac
doxygen.cfg
doxygen.inc
grid-config.in
38 lines
1.3 KiB
C++
38 lines
1.3 KiB
C++
#pragma once
|
|
namespace Grid {
|
|
// L1p optimisation
|
|
inline void bgq_l1p_optimisation(int mode)
|
|
{
|
|
#ifdef QPX
|
|
#undef L1P_CFG_PF_USR
|
|
#define L1P_CFG_PF_USR (0x3fde8000108ll) /* (64 bit reg, 23 bits wide, user/unpriv) */
|
|
|
|
uint64_t cfg_pf_usr;
|
|
if ( mode ) {
|
|
cfg_pf_usr =
|
|
L1P_CFG_PF_USR_ifetch_depth(0)
|
|
| L1P_CFG_PF_USR_ifetch_max_footprint(1)
|
|
| L1P_CFG_PF_USR_pf_stream_est_on_dcbt
|
|
| L1P_CFG_PF_USR_pf_stream_establish_enable
|
|
| L1P_CFG_PF_USR_pf_stream_optimistic
|
|
| L1P_CFG_PF_USR_pf_adaptive_throttle(0xF) ;
|
|
// if ( sizeof(Float) == sizeof(double) ) {
|
|
cfg_pf_usr |= L1P_CFG_PF_USR_dfetch_depth(2)| L1P_CFG_PF_USR_dfetch_max_footprint(3) ;
|
|
// } else {
|
|
// cfg_pf_usr |= L1P_CFG_PF_USR_dfetch_depth(1)| L1P_CFG_PF_USR_dfetch_max_footprint(2) ;
|
|
// }
|
|
} else {
|
|
cfg_pf_usr = L1P_CFG_PF_USR_dfetch_depth(1)
|
|
| L1P_CFG_PF_USR_dfetch_max_footprint(2)
|
|
| L1P_CFG_PF_USR_ifetch_depth(0)
|
|
| L1P_CFG_PF_USR_ifetch_max_footprint(1)
|
|
| L1P_CFG_PF_USR_pf_stream_est_on_dcbt
|
|
| L1P_CFG_PF_USR_pf_stream_establish_enable
|
|
| L1P_CFG_PF_USR_pf_stream_optimistic
|
|
| L1P_CFG_PF_USR_pf_stream_prefetch_enable;
|
|
}
|
|
*((uint64_t *)L1P_CFG_PF_USR) = cfg_pf_usr;
|
|
#endif
|
|
}
|
|
}
|