typed-objects-es7 icon indicating copy to clipboard operation
typed-objects-es7 copied to clipboard

Grounded SIMD types

Open RLH opened this issue 11 years ago • 1 comments

What is the approach going to be for SIMD vector types such as float32x4? Is the hope that the "sufficiently sophisticated compiler" will be able to take an array of float32s and interpret it as an array of float32x4 without hints from the programmer? Alternatively a struct with 4 float32 fields might be recognized as amenable to SIMD instructions being generated by the compiler. Finally what is the relationship between the base types of the value types.

RLH avatar Apr 03 '14 14:04 RLH

Our hope is that float32x4 will be expressible as a "value object" - which is a concept related to typed objects but different. One idea would be:

  const float32x4 = new ValueType({x : float32, y : float32, z : float32, w : float32 });
  float32x4.prototype.xxyy = ... // native function translated to SIMD instruction

dslomov avatar Apr 08 '14 06:04 dslomov