FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
pipeline.h File Reference

Go to the source code of this file.

Macros

#define clib_pipeline_stage(F, TYPE, ARG, I, BODY)
 
#define clib_pipeline_stage_static(F, TYPE, ARG, I, BODY)
 
#define clib_pipeline_stage_no_inline(F, TYPE, ARG, I, BODY)
 
#define clib_pipeline_stage_execute(F, A, I, S)   F##_##S (A, _clib_pipeline_var(i) - (I))
 
#define clib_pipeline_main_stage(F, A, I)   clib_pipeline_stage_execute (F, A, I, inline)
 
#define clib_pipeline_init_stage(F, A, I)   if (_clib_pipeline_var(i) >= (I)) clib_pipeline_stage_execute (F, A, I, no_inline)
 
#define clib_pipeline_exit_stage(F, A, I)
 
#define clib_pipeline_init_loop
 
#define clib_pipeline_main_loop
 
#define clib_pipeline_exit_loop
 
#define clib_pipeline_run_2_stage(N, ARG, STAGE0, STAGE1)
 
#define clib_pipeline_run_3_stage(N, ARG, STAGE0, STAGE1, STAGE2)
 
#define clib_pipeline_run_4_stage(N, ARG, STAGE0, STAGE1, STAGE2, STAGE3)
 

Macro Definition Documentation

◆ clib_pipeline_exit_loop

#define clib_pipeline_exit_loop
Value:
for (; _clib_pipeline_var(i) < (_clib_pipeline_var(n_vectors) \
+ _clib_pipeline_var(n_stages) - 1); \
_clib_pipeline_var(i)++)
int i

Definition at line 85 of file pipeline.h.

◆ clib_pipeline_exit_stage

#define clib_pipeline_exit_stage (   F,
  A,
 
)
Value:
if (_clib_pipeline_var(i) >= (I) && _clib_pipeline_var(i) - (I) < _clib_pipeline_var(n_vectors)) \
clib_pipeline_stage_execute (F, A, I, no_inline)
int i
#define A(x)
Definition: main.c:1018
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 70 of file pipeline.h.

◆ clib_pipeline_init_loop

#define clib_pipeline_init_loop
Value:
for (_clib_pipeline_var(i) = 0; \
_clib_pipeline_var(i) < \
clib_min (_clib_pipeline_var(n_stages) - 1, \
_clib_pipeline_var(n_vectors)); \
_clib_pipeline_var(i)++)
int i

Definition at line 74 of file pipeline.h.

◆ clib_pipeline_init_stage

#define clib_pipeline_init_stage (   F,
  A,
 
)    if (_clib_pipeline_var(i) >= (I)) clib_pipeline_stage_execute (F, A, I, no_inline)

Definition at line 68 of file pipeline.h.

◆ clib_pipeline_main_loop

#define clib_pipeline_main_loop
Value:
for (; _clib_pipeline_var(i) < _clib_pipeline_var(n_vectors); \
_clib_pipeline_var(i)++)
int i

Definition at line 81 of file pipeline.h.

◆ clib_pipeline_main_stage

#define clib_pipeline_main_stage (   F,
  A,
 
)    clib_pipeline_stage_execute (F, A, I, inline)

Definition at line 66 of file pipeline.h.

◆ clib_pipeline_run_2_stage

#define clib_pipeline_run_2_stage (   N,
  ARG,
  STAGE0,
  STAGE1 
)
Value:
do { \
uword _clib_pipeline_var(n_vectors) = (N); \
uword _clib_pipeline_var(n_stages) = 2; \
uword _clib_pipeline_var(i); \
\
clib_pipeline_init_loop \
{ \
clib_pipeline_init_stage (STAGE0, ARG, 0); \
} \
\
clib_pipeline_main_loop \
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
} \
\
clib_pipeline_exit_loop \
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
} \
} while (0)
int i

Definition at line 90 of file pipeline.h.

◆ clib_pipeline_run_3_stage

#define clib_pipeline_run_3_stage (   N,
  ARG,
  STAGE0,
  STAGE1,
  STAGE2 
)
Value:
do { \
uword _clib_pipeline_var(n_vectors) = (N); \
uword _clib_pipeline_var(n_stages) = 3; \
uword _clib_pipeline_var(i); \
\
clib_pipeline_init_loop \
{ \
clib_pipeline_init_stage (STAGE0, ARG, 0); \
clib_pipeline_init_stage (STAGE1, ARG, 1); \
} \
\
clib_pipeline_main_loop \
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
clib_pipeline_main_stage (STAGE2, ARG, 2); \
} \
\
clib_pipeline_exit_loop \
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
clib_pipeline_exit_stage (STAGE2, ARG, 2); \
} \
} while (0)
int i

Definition at line 113 of file pipeline.h.

◆ clib_pipeline_run_4_stage

#define clib_pipeline_run_4_stage (   N,
  ARG,
  STAGE0,
  STAGE1,
  STAGE2,
  STAGE3 
)
Value:
do { \
uword _clib_pipeline_var(n_vectors) = (N); \
uword _clib_pipeline_var(n_stages) = 4; \
uword _clib_pipeline_var(i); \
\
clib_pipeline_init_loop \
{ \
clib_pipeline_init_stage (STAGE0, ARG, 0); \
clib_pipeline_init_stage (STAGE1, ARG, 1); \
clib_pipeline_init_stage (STAGE2, ARG, 2); \
} \
\
clib_pipeline_main_loop \
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
clib_pipeline_main_stage (STAGE2, ARG, 2); \
clib_pipeline_main_stage (STAGE3, ARG, 3); \
} \
\
clib_pipeline_exit_loop \
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
clib_pipeline_exit_stage (STAGE2, ARG, 2); \
clib_pipeline_exit_stage (STAGE3, ARG, 3); \
} \
} while (0)
int i

Definition at line 139 of file pipeline.h.

◆ clib_pipeline_stage

#define clib_pipeline_stage (   F,
  TYPE,
  ARG,
  I,
  BODY 
)
Value:
always_inline void F##_inline (void * _, u32 I) \
{ TYPE ARG = _; { BODY; } } \
never_inline void F##_no_inline (TYPE ARG, u32 I) \
{ F##_inline (ARG, I); }
#define always_inline
Definition: clib.h:99
unsigned int u32
Definition: types.h:88
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 43 of file pipeline.h.

◆ clib_pipeline_stage_execute

#define clib_pipeline_stage_execute (   F,
  A,
  I,
  S 
)    F##_##S (A, _clib_pipeline_var(i) - (I))

Definition at line 63 of file pipeline.h.

◆ clib_pipeline_stage_no_inline

#define clib_pipeline_stage_no_inline (   F,
  TYPE,
  ARG,
  I,
  BODY 
)
Value:
never_inline void F##_no_inline (void * _, u32 I) \
{ TYPE ARG = _; { BODY; } } \
never_inline void F##_inline (TYPE ARG, u32 I) \
{ F##_no_inline (ARG, I); }
unsigned int u32
Definition: types.h:88
#define never_inline
Definition: clib.h:96
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 55 of file pipeline.h.

◆ clib_pipeline_stage_static

#define clib_pipeline_stage_static (   F,
  TYPE,
  ARG,
  I,
  BODY 
)
Value:
static_always_inline void F##_inline (void * _, u32 I) \
{ TYPE ARG = _; { BODY; } } \
never_inline void F##_no_inline (TYPE ARG, u32 I) \
{ F##_inline (ARG, I); }
#define static_always_inline
Definition: clib.h:100
unsigned int u32
Definition: types.h:88
#define F(n, v, s)
Definition: cuckoo_common.h:38

Definition at line 49 of file pipeline.h.