diff options
Diffstat (limited to 'src/vppinfra/vec.h')
-rw-r--r-- | src/vppinfra/vec.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vppinfra/vec.h b/src/vppinfra/vec.h index dc7b908a3b5..470a4f190c2 100644 --- a/src/vppinfra/vec.h +++ b/src/vppinfra/vec.h @@ -360,7 +360,7 @@ do { \ if (_v(l) > 0) \ { \ vec_resize_ha (_v(v), _v(l), (H), (A)); \ - clib_memcpy (_v(v), (V), _v(l) * sizeof ((V)[0]));\ + clib_memcpy_fast (_v(v), (V), _v(l) * sizeof ((V)[0]));\ } \ _v(v); \ }) @@ -387,7 +387,7 @@ do { \ @param DST destination @param SRC source */ -#define vec_copy(DST,SRC) clib_memcpy (DST, SRC, vec_len (DST) * \ +#define vec_copy(DST,SRC) clib_memcpy_fast (DST, SRC, vec_len (DST) * \ sizeof ((DST)[0])) /** \brief Clone a vector. Make a new vector with the @@ -587,7 +587,7 @@ do { \ word _v(n) = (N); \ word _v(l) = vec_len (V); \ V = _vec_resize ((V), _v(n), (_v(l) + _v(n)) * sizeof ((V)[0]), (H), (A)); \ - clib_memcpy ((V) + _v(l), (E), _v(n) * sizeof ((V)[0])); \ + clib_memcpy_fast ((V) + _v(l), (E), _v(n) * sizeof ((V)[0])); \ } while (0) /** \brief Add N elements to end of vector V (no header, unspecified alignment) @@ -749,7 +749,7 @@ do { \ memmove ((V) + _v(m) + _v(n), \ (V) + _v(m), \ (_v(l) - _v(m)) * sizeof ((V)[0])); \ - clib_memcpy ((V) + _v(m), (E), \ + clib_memcpy_fast ((V) + _v(m), (E), \ _v(n) * sizeof ((V)[0])); \ } while (0) @@ -824,7 +824,7 @@ do { \ \ v1 = _vec_resize ((v1), _v(l2), \ (_v(l1) + _v(l2)) * sizeof ((v1)[0]), 0, 0); \ - clib_memcpy ((v1) + _v(l1), (v2), _v(l2) * sizeof ((v2)[0])); \ + clib_memcpy_fast ((v1) + _v(l1), (v2), _v(l2) * sizeof ((v2)[0])); \ } while (0) /** \brief Append v2 after v1. Result in v1. Specified alignment. @@ -840,7 +840,7 @@ do { \ \ v1 = _vec_resize ((v1), _v(l2), \ (_v(l1) + _v(l2)) * sizeof ((v1)[0]), 0, align); \ - clib_memcpy ((v1) + _v(l1), (v2), _v(l2) * sizeof ((v2)[0])); \ + clib_memcpy_fast ((v1) + _v(l1), (v2), _v(l2) * sizeof ((v2)[0])); \ } while (0) /** \brief Prepend v2 before v1. Result in v1. @@ -856,7 +856,7 @@ do { \ v1 = _vec_resize ((v1), _v(l2), \ (_v(l1) + _v(l2)) * sizeof ((v1)[0]), 0, 0); \ memmove ((v1) + _v(l2), (v1), _v(l1) * sizeof ((v1)[0])); \ - clib_memcpy ((v1), (v2), _v(l2) * sizeof ((v2)[0])); \ + clib_memcpy_fast ((v1), (v2), _v(l2) * sizeof ((v2)[0])); \ } while (0) /** \brief Prepend v2 before v1. Result in v1. Specified alignment @@ -873,7 +873,7 @@ do { \ v1 = _vec_resize ((v1), _v(l2), \ (_v(l1) + _v(l2)) * sizeof ((v1)[0]), 0, align); \ memmove ((v1) + _v(l2), (v1), _v(l1) * sizeof ((v1)[0])); \ - clib_memcpy ((v1), (v2), _v(l2) * sizeof ((v2)[0])); \ + clib_memcpy_fast ((v1), (v2), _v(l2) * sizeof ((v2)[0])); \ } while (0) @@ -995,7 +995,7 @@ do { \ vec_reset_length (V); \ vec_validate ((V), (L)); \ if ((S) && (L)) \ - clib_memcpy ((V), (S), (L)); \ + clib_memcpy_fast ((V), (S), (L)); \ (V)[(L)] = 0; \ } while (0) |