When setting several targets to ISPC the compiler will generate one object file and one header for each target. The default function that one calls in this mode will do a run-time selection and call the appropriate one depending on instruction set the CPU supports. The user can chose to not use this function but instead calling function_name_<target> such as foobar_avx2 and do the detection themselves.
Changes in this PR does a bunch of things
First we need to tell Tundra about the output files the compiler generates which is the meat of this change.
Targets is optional, so the user can chose to ignore it and use the old behavior if wanted, but to support more than on target then Targets parameter needs to be used.
This PR adds support to specify different targets when using ISPC like this
When setting several targets to ISPC the compiler will generate one object file and one header for each target. The default function that one calls in this mode will do a run-time selection and call the appropriate one depending on instruction set the CPU supports. The user can chose to not use this function but instead calling
function_name_<target>
such asfoobar_avx2
and do the detection themselves.Changes in this PR does a bunch of things
Targets
is optional, so the user can chose to ignore it and use the old behavior if wanted, but to support more than on target thenTargets
parameter needs to be used.sse4,avx2
to the ISPC example