Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Improve cpu { coremask-% } configure option
[vpp.git]
/
src
/
vppinfra
/
vec_bootstrap.h
diff --git
a/src/vppinfra/vec_bootstrap.h
b/src/vppinfra/vec_bootstrap.h
index
6db83f2
..
bff6889
100644
(file)
--- a/
src/vppinfra/vec_bootstrap.h
+++ b/
src/vppinfra/vec_bootstrap.h
@@
-191,6
+191,10
@@
for (var = vec_end (vec) - 1; var >= (vec); var--)
/** \brief Iterate over vector indices. */
#define vec_foreach_index(var,v) for ((var) = 0; (var) < vec_len (v); (var)++)
/** \brief Iterate over vector indices. */
#define vec_foreach_index(var,v) for ((var) = 0; (var) < vec_len (v); (var)++)
+/** \brief Iterate over vector indices (reverse). */
+#define vec_foreach_index_backwards(var,v) \
+ for ((var) = vec_len((v)) - 1; (var) >= 0; (var)--)
+
#endif /* included_clib_vec_bootstrap_h */
/*
#endif /* included_clib_vec_bootstrap_h */
/*