1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2017 Intel Corporation
5 #include <rte_memcpy.h>
6 #include <rte_cpuflags.h>
9 void *(*rte_memcpy_ptr)(void *dst, const void *src, size_t n) = NULL;
11 RTE_INIT(rte_memcpy_init)
13 #ifdef CC_SUPPORT_AVX512F
14 if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F)) {
15 rte_memcpy_ptr = rte_memcpy_avx512f;
16 RTE_LOG(DEBUG, EAL, "AVX512 memcpy is using!\n");
20 #ifdef CC_SUPPORT_AVX2
21 if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2)) {
22 rte_memcpy_ptr = rte_memcpy_avx2;
23 RTE_LOG(DEBUG, EAL, "AVX2 memcpy is using!\n");
27 rte_memcpy_ptr = rte_memcpy_sse;
28 RTE_LOG(DEBUG, EAL, "Default SSE/AVX memcpy is using!\n");