really?I don't think so. AVX Marco only exist in the gcc version below 4.4, I still need to check if below or beyond 4.4 am I right?
Thanks, Michael > ? 2015?11?27????5:01?Thomas Monjalon <thomas.monjalon at 6wind.com> ??? > > 2015-11-27 02:26, Qiu, Michael: >>> On 2015/11/27 5:29, Thomas Monjalon wrote: >>> 2015-11-26 18:49, Michael Qiu: >>>> gcc 4.3.4 does not include "immintrin.h", and will post below error: >>>> lib/librte_sched/rte_sched.c:56:23: error: >>>> immintrin.h: No such file or directory >>>> >>>> To avoid this issue, a gcc version check is need and a flag to indicate >>>> vector ablility. >>> [...] >>>> +#if (defined(__ICC) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) >>>> + >>>> +#if defined(__AVX__) >>>> #include <immintrin.h> >>>> +#define SCHED_VECTOR_ENABLE >>>> +#endif >>>> + >>>> +#else >>>> + >>>> +#include <x86intrin.h> >>>> +#define SCHED_VECTOR_ENABLE >>>> + >>>> +#endif >>> This kind of complication is managed by EAL. >>> I think we should include rte_vect.h. >> >> As I know here it needs a flag to identify whether the platform support >> AVX, if not it will not use it, so I don't know if we could only simply >> include rte_vect.h? > > It's not exclusive. > You can include rte_vect.h and check AVX to define SCHED_VECTOR_ENABLE. >