| 3240 | |
| 3241 | #ifdef RTE_ARCH_X86 |
| 3242 | static inline bool |
| 3243 | get_avx_supported(bool request_avx512) |
| 3244 | { |
| 3245 | if (request_avx512) { |
| 3246 | if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_512 && |
| 3247 | rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 && |
| 3248 | rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) == 1) |
| 3249 | #ifdef CC_AVX512_SUPPORT |
| 3250 | return true; |
| 3251 | #else |
| 3252 | PMD_DRV_LOG(NOTICE, |
| 3253 | "AVX512 is not supported in build env"); |
| 3254 | return false; |
| 3255 | #endif |
| 3256 | } else { |
| 3257 | if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 && |
| 3258 | rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 && |
| 3259 | rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) |
| 3260 | return true; |
| 3261 | } |
| 3262 | |
| 3263 | return false; |
| 3264 | } |
| 3265 | #endif /* RTE_ARCH_X86 */ |
| 3266 | |
| 3267 |
no test coverage detected