Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #34 from chunywang/simd/xwalk-5731
Browse files Browse the repository at this point in the history
Use extractLane function instead of SIMD.XXXX.x/y/z/w
  • Loading branch information
Raphael Kubo da Costa committed Nov 25, 2015
2 parents 76cb73d + cc0cbdd commit cb8a230
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions simd-mandelbrot/mandelbrot-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ function drawMandelbrot (params) {
var xf4 = SIMD.Float32x4(xf, xf, xf, xf);
var yf4 = SIMD.Float32x4(yf, yf+yd, yf+yd+yd, yf+yd+yd+yd);
var m4 = mandelx4 (xf4, yf4);
mapColorAndSetPixel (x, y, m4.x);
mapColorAndSetPixel (x, y+1, m4.y);
mapColorAndSetPixel (x, y+2, m4.z);
mapColorAndSetPixel (x, y+3, m4.w);
mapColorAndSetPixel (x, y, SIMD.Int32x4.extractLane(m4, 0));
mapColorAndSetPixel (x, y+1, SIMD.Int32x4.extractLane(m4, 1));
mapColorAndSetPixel (x, y+2, SIMD.Int32x4.extractLane(m4, 2));
mapColorAndSetPixel (x, y+3, SIMD.Int32x4.extractLane(m4, 3));
yf += ydx4;
}
}
Expand Down

0 comments on commit cb8a230

Please sign in to comment.