]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/lib/librte_eal/include/generic/rte_memcpy.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_eal / include / generic / rte_memcpy.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
3 */
4
5 #ifndef _RTE_MEMCPY_H_
6 #define _RTE_MEMCPY_H_
7
8 /**
9 * @file
10 *
11 * Functions for vectorised implementation of memcpy().
12 */
13
14 /**
15 * Copy 16 bytes from one location to another using optimised
16 * instructions. The locations should not overlap.
17 *
18 * @param dst
19 * Pointer to the destination of the data.
20 * @param src
21 * Pointer to the source data.
22 */
23 static inline void
24 rte_mov16(uint8_t *dst, const uint8_t *src);
25
26 /**
27 * Copy 32 bytes from one location to another using optimised
28 * instructions. The locations should not overlap.
29 *
30 * @param dst
31 * Pointer to the destination of the data.
32 * @param src
33 * Pointer to the source data.
34 */
35 static inline void
36 rte_mov32(uint8_t *dst, const uint8_t *src);
37
38 #ifdef __DOXYGEN__
39
40 /**
41 * Copy 48 bytes from one location to another using optimised
42 * instructions. The locations should not overlap.
43 *
44 * @param dst
45 * Pointer to the destination of the data.
46 * @param src
47 * Pointer to the source data.
48 */
49 static inline void
50 rte_mov48(uint8_t *dst, const uint8_t *src);
51
52 #endif /* __DOXYGEN__ */
53
54 /**
55 * Copy 64 bytes from one location to another using optimised
56 * instructions. The locations should not overlap.
57 *
58 * @param dst
59 * Pointer to the destination of the data.
60 * @param src
61 * Pointer to the source data.
62 */
63 static inline void
64 rte_mov64(uint8_t *dst, const uint8_t *src);
65
66 /**
67 * Copy 128 bytes from one location to another using optimised
68 * instructions. The locations should not overlap.
69 *
70 * @param dst
71 * Pointer to the destination of the data.
72 * @param src
73 * Pointer to the source data.
74 */
75 static inline void
76 rte_mov128(uint8_t *dst, const uint8_t *src);
77
78 /**
79 * Copy 256 bytes from one location to another using optimised
80 * instructions. The locations should not overlap.
81 *
82 * @param dst
83 * Pointer to the destination of the data.
84 * @param src
85 * Pointer to the source data.
86 */
87 static inline void
88 rte_mov256(uint8_t *dst, const uint8_t *src);
89
90 #ifdef __DOXYGEN__
91
92 /**
93 * Copy bytes from one location to another. The locations must not overlap.
94 *
95 * @note This is implemented as a macro, so it's address should not be taken
96 * and care is needed as parameter expressions may be evaluated multiple times.
97 *
98 * @param dst
99 * Pointer to the destination of the data.
100 * @param src
101 * Pointer to the source data.
102 * @param n
103 * Number of bytes to copy.
104 * @return
105 * Pointer to the destination data.
106 */
107 static void *
108 rte_memcpy(void *dst, const void *src, size_t n);
109
110 #endif /* __DOXYGEN__ */
111
112 #endif /* _RTE_MEMCPY_H_ */