Add support for non-factored variants of gather/scatter functions.

We now have two ways of approaching gather/scatters with a common base
pointer and with offset vectors.  For targets with native gather/scatter,
we just turn those into base + {1/2/4/8}*offsets.  For targets without,
we turn those into base + {1/2/4/8}*varying_offsets + const_offsets,
where const_offsets is a compile-time constant.

Infrastructure for issue #325.
This commit is contained in:
Matt Pharr
2012-07-11 14:09:06 -07:00
parent ec0280be11
commit 10b79fb41b
4 changed files with 965 additions and 356 deletions

8
ispc.h
View File

@@ -252,9 +252,15 @@ struct Target {
conversions. */
bool hasHalf;
/** Indicates whether there is an ISA random number instruciton. */
/** Indicates whether there is an ISA random number instruction. */
bool hasRand;
/** Indicates whether the target has a native gather instruction */
bool hasGather;
/** Indicates whether the target has a native scatter instruction */
bool hasScatter;
/** Indicates whether the target has support for transcendentals (beyond
sqrt, which we assume that all of them handle). */
bool hasTranscendentals;