FD.io VPP  v17.07.01-10-g3be13f0
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

#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)++)
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:337

Definition at line 85 of file pipeline.h.

#define clib_pipeline_exit_stage (   F,
  A,
  I 
)
Value:
if (_clib_pipeline_var(i) >= (I) && _clib_pipeline_var(i) - (I) < _clib_pipeline_var(n_vectors)) \
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:337
#define F(b, c, d)
Definition: md5.c:44
#define clib_pipeline_stage_execute(F, A, I, S)
Definition: pipeline.h:63
#define I(b, c, d)
Definition: md5.c:47

Definition at line 70 of file pipeline.h.

#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)++)
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:337
#define clib_min(x, y)
Definition: clib.h:332

Definition at line 74 of file pipeline.h.

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

Definition at line 68 of file pipeline.h.

#define clib_pipeline_main_loop
Value:
for (; _clib_pipeline_var(i) < _clib_pipeline_var(n_vectors); \
_clib_pipeline_var(i)++)
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:337

Definition at line 81 of file pipeline.h.

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

Definition at line 66 of file pipeline.h.

#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_stage (STAGE0, ARG, 0); \
} \
\
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
} \
\
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
} \
} while (0)
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:337
#define clib_pipeline_exit_loop
Definition: pipeline.h:85
#define clib_pipeline_init_stage(F, A, I)
Definition: pipeline.h:68
#define clib_pipeline_exit_stage(F, A, I)
Definition: pipeline.h:70
#define clib_pipeline_main_stage(F, A, I)
Definition: pipeline.h:66
#define clib_pipeline_main_loop
Definition: pipeline.h:81
u64 uword
Definition: types.h:112
#define clib_pipeline_init_loop
Definition: pipeline.h:74

Definition at line 90 of file pipeline.h.

#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_stage (STAGE0, ARG, 0); \
clib_pipeline_init_stage (STAGE1, ARG, 1); \
} \
\
{ \
clib_pipeline_main_stage (STAGE0, ARG, 0); \
clib_pipeline_main_stage (STAGE1, ARG, 1); \
clib_pipeline_main_stage (STAGE2, ARG, 2); \
} \
\
{ \
clib_pipeline_exit_stage (STAGE1, ARG, 1); \
clib_pipeline_exit_stage (STAGE2, ARG, 2); \
} \
} while (0)
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:337
#define clib_pipeline_exit_loop
Definition: pipeline.h:85
#define clib_pipeline_init_stage(F, A, I)
Definition: pipeline.h:68
#define clib_pipeline_exit_stage(F, A, I)
Definition: pipeline.h:70
#define clib_pipeline_main_stage(F, A, I)
Definition: pipeline.h:66
#define clib_pipeline_main_loop
Definition: pipeline.h:81
u64 uword
Definition: types.h:112
#define clib_pipeline_init_loop
Definition: pipeline.h:74

Definition at line 113 of file pipeline.h.

#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_stage (STAGE0, ARG, 0); \
clib_pipeline_init_stage (STAGE1, ARG, 1); \
clib_pipeline_init_stage (STAGE2, ARG, 2); \
} \
\
{ \
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_stage (STAGE1, ARG, 1); \
clib_pipeline_exit_stage (STAGE2, ARG, 2); \
clib_pipeline_exit_stage (STAGE3, ARG, 3); \
} \
} while (0)
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:337
#define clib_pipeline_exit_loop
Definition: pipeline.h:85
#define clib_pipeline_init_stage(F, A, I)
Definition: pipeline.h:68
#define clib_pipeline_exit_stage(F, A, I)
Definition: pipeline.h:70
#define clib_pipeline_main_stage(F, A, I)
Definition: pipeline.h:66
#define clib_pipeline_main_loop
Definition: pipeline.h:81
u64 uword
Definition: types.h:112
#define clib_pipeline_init_loop
Definition: pipeline.h:74

Definition at line 139 of file pipeline.h.

#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 F(b, c, d)
Definition: md5.c:44
#define always_inline
Definition: clib.h:84
#define never_inline
Definition: clib.h:81
unsigned int u32
Definition: types.h:88
#define I(b, c, d)
Definition: md5.c:47

Definition at line 43 of file pipeline.h.

#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.

#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); }
#define F(b, c, d)
Definition: md5.c:44
#define never_inline
Definition: clib.h:81
unsigned int u32
Definition: types.h:88
#define I(b, c, d)
Definition: md5.c:47

Definition at line 55 of file pipeline.h.

#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 F(b, c, d)
Definition: md5.c:44
#define static_always_inline
Definition: clib.h:85
#define never_inline
Definition: clib.h:81
unsigned int u32
Definition: types.h:88
#define I(b, c, d)
Definition: md5.c:47

Definition at line 49 of file pipeline.h.