Grid 0.7.0
l1p.h
Go to the documentation of this file.
1#pragma once
3// L1p optimisation
5{
6#ifdef QPX
7#undef L1P_CFG_PF_USR
8#define L1P_CFG_PF_USR (0x3fde8000108ll) /* (64 bit reg, 23 bits wide, user/unpriv) */
9
10 uint64_t cfg_pf_usr;
11 if ( mode ) {
12 cfg_pf_usr =
13 L1P_CFG_PF_USR_ifetch_depth(0)
14 | L1P_CFG_PF_USR_ifetch_max_footprint(1)
15 | L1P_CFG_PF_USR_pf_stream_est_on_dcbt
16 | L1P_CFG_PF_USR_pf_stream_establish_enable
17 | L1P_CFG_PF_USR_pf_stream_optimistic
18 | L1P_CFG_PF_USR_pf_adaptive_throttle(0xF) ;
19 // if ( sizeof(Float) == sizeof(double) ) {
20 cfg_pf_usr |= L1P_CFG_PF_USR_dfetch_depth(2)| L1P_CFG_PF_USR_dfetch_max_footprint(3) ;
21 // } else {
22 // cfg_pf_usr |= L1P_CFG_PF_USR_dfetch_depth(1)| L1P_CFG_PF_USR_dfetch_max_footprint(2) ;
23 // }
24 } else {
25 cfg_pf_usr = L1P_CFG_PF_USR_dfetch_depth(1)
26 | L1P_CFG_PF_USR_dfetch_max_footprint(2)
27 | L1P_CFG_PF_USR_ifetch_depth(0)
28 | L1P_CFG_PF_USR_ifetch_max_footprint(1)
29 | L1P_CFG_PF_USR_pf_stream_est_on_dcbt
30 | L1P_CFG_PF_USR_pf_stream_establish_enable
31 | L1P_CFG_PF_USR_pf_stream_optimistic
32 | L1P_CFG_PF_USR_pf_stream_prefetch_enable;
33 }
34 *((uint64_t *)L1P_CFG_PF_USR) = cfg_pf_usr;
35#endif
36}
#define accelerator_inline
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
accelerator_inline void bgq_l1p_optimisation(int mode)
Definition l1p.h:4