Quantcast
Channel: User CPlus - Programming Language Design and Implementation Stack Exchange
Viewing all articles
Browse latest Browse all 65

How can a programming language support vectorization portably?

$
0
0

C and C++ have no vector types or operations but many compilers offer their own non-portable extensions such as __attribute__((__ext_vector_type__())). The issue is vector types corresponding to vector registers and specific CPU vector instructions are not portable and the semantics vary for different CPUs.

However all SIMD implementations are conceptually the same: Applying the same operation to many different values at a time. What semantics could a language include that supports vectorization or constructs that could be trivially vectorized by a compiler and would be more or less independent of the underlying SIMD semantics of the CPU? What would be a good abstraction for vector operations that a language could provide?


Viewing all articles
Browse latest Browse all 65

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>