ISPC is not only a an explicit vectorization language, but has some novel semantics, particularly for structures. Not only SOA vs. AOS, but the whole notion of "uniform" vs. "varying" fields of a structure is a new thing. A macro-based imitation might be plausible.
On Wed, Sep 17, 2014 at 7:58 PM, Erik Schnetter <schnet...@cct.lsu.edu> wrote: > On Wed, Sep 17, 2014 at 7:14 PM, <gael.mc...@gmail.com> wrote: > > Slightly OT, but since I won't talk about it myself I don't feel this > will harm the current thread ... > > > > > > I don't know if it can be of any help/use/interest for any of you but > some people (some at Intel) are actively working on SIMD use with LLVM: > > > > https://ispc.github.io/index.html > > > > But I really don't have the skills to tell you if they "just" wrote a > new C-like language that is autovectorizing well or if they do some even > smarter stuff to get maximum performances. > > I think they are up to something clever. > > If I read things correctly: ispc adds new keywords that describes the > memory layout (!) of data structures that are accessed via SIMD > instructions. There exist a few commonly-used data layout > optimizations that are generally necessary to achieve good performance > with SIMD code, called "SOA" or "replicated" or similar. Apparently, > ispc introduces respective keywords that automatically transform the > layout of data data structures. > > I wonder whether something equivalent could be implemented via macros > in Julia. These would be macros acting on type declarations, not on > code. Presumably, these would be array- or structure-like data types, > and accessing them is then slightly more complex, so that one would > also need to automatically define respective iterators. Maybe there > could be a companion macro that acts on loops, so that the loops are > transformed (and simd'ized) the same way as the data types... > > -erik > > -- > Erik Schnetter <schnet...@cct.lsu.edu> > http://www.perimeterinstitute.ca/personal/eschnetter/ >