I'm working on a project with a function which has :
- an optimized version for MIC with MIC intrinsics
- an optimized version for CPU with AVX intrinsics
I'd like to make my project compatible for :
- CPU run only
- offload run with CPU+MIC.
In order to do so I tried to use "__attribute__ ((target(mic))) function" so that :
- when offloading, the function is compiled for MIC
- when not offloading (-nooffload), the CPU version is compiled.
However, as earlier mentionned my function has two different versions : one with MIC intrinsics and one with AVX intrinsics, so how can I declare a function for offload with two versions of that function ?
Thanks in advance,