23 #ifndef DOCA_PCC_DEV_UTILS_H_
24 #define DOCA_PCC_DEV_UTILS_H_
31 #define DOCA_DPA_DEVICE
43 #define doca_pcc_dev_fxp_recip(a_fp) __dpa_fxp_rcp(a_fp)
48 #define doca_pcc_dev_fxp_power2(a_fp) __dpa_fxp_pow2(a_fp)
53 #define doca_pcc_dev_fxp_log2(a_fp) __dpa_fxp_log2(a_fp)
58 #define doca_pcc_dev_fls(a) (32 - __builtin_clz(a))
63 #define doca_pcc_dev_mult(a, b) ((uint64_t)(a) * (uint64_t)(b))
68 #define doca_pcc_dev_fxp_mult(a, b) ((uint32_t)((doca_pcc_dev_mult((a), (b)) >> 16) & 0xffffffff))
73 #define doca_pcc_dev_fence_all() __dpa_thread_fence(__DPA_SYSTEM, __DPA_RW, __DPA_RW)
78 #define doca_pcc_dev_fence_memory() __dpa_thread_fence(__DPA_MEMORY, __DPA_RW, __DPA_RW)
83 #define doca_pcc_dev_fence_io() __dpa_thread_fence(__DPA_MMIO, __DPA_RW, __DPA_RW)
88 #define doca_pcc_dev_fence_w_r() __dpa_thread_fence(__DPA_MEMORY, __DPA_W, __DPA_R)
93 #define doca_pcc_dev_get_thread_time() __dpa_thread_time()
#define DOCA_STABLE
To set a Symbol (or specifically a function) as stable API, i.e. it won't be changed.
#define FORCE_INLINE
static inline wrapper
DOCA_STABLE FORCE_INLINE uint64_t doca_pcc_dev_get_timer(void)
Core timer access (elapsed time in uSec) function 64 bits.
#define doca_pcc_dev_get_thread_time()
return 1usec tick count
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_timer_lo(void)
Core timer access (elapsed time in uSec) function 32 bits.