Advertisement
Guest User

swizzle

a guest
Feb 26th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. https://github.com/tc39/ecmascript_simd/search?utf8=%E2%9C%93&q=swizzle
  2. This is the central package that makes everything run right, they never declare how sizzle got created that makes me think it is ingrained in the internet architecture at this moment. let me know if you spot any mistaeks(I want a curtessy call).
  3.  
  4. JavaScript
  5.  
  6. src/benchmarks/inverse4x4.js
  7. Showing the top two matches. Last indexed on Sep 30, 2015.
  8. tmp1 = SIMD.Float32x4.mul(row2, row3);
  9. tmp1 = SIMD.Float32x4.swizzle(tmp1, 1, 0, 3, 2); // 0xB1 = 10110001
  10. minor0 = SIMD.Float32x4.mul(row1, tmp1);
  11. minor1 = SIMD.Float32x4.mul(row0, tmp1);
  12. tmp1 = SIMD.Float32x4.swizzle(tmp1, 2, 3, 0, 1); // 0x4E = 01001110
  13. JavaScript
  14.  
  15. src/benchmarks/matrix-multiplication.js
  16. Showing the top two matches. Last indexed on Sep 30, 2015.
  17. SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(b0, 0, 0, 0, 0), a0),
  18. SIMD.Float32x4.add(
  19. SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(b0, 1, 1, 1, 1), a1),
  20. SIMD.Float32x4.add(
  21. JavaScript
  22.  
  23. src/benchmarks/transform.js
  24. Showing the top two matches. Last indexed on Sep 30, 2015.
  25. Out[3] = (m3 * x + m7 * y + m11 * z + m15 * w);
  26. }
  27. }
  28.  
  29. function simdVertexTransform(n) {
  30. for (var i = 0; i < n; i++) {
  31. var xxxx = SIMD.Float32x4.swizzle(SIMD.Float32x4.load(Vx, 0), 0, 0, 0, 0);
  32. var yyyy = SIMD.Float32x4.swizzle(SIMD.Float32x4.load(Vx, 0), 1, 1, 1, 1);
  33. z = SIMD.Float32x4.add(z, SIMD.Float32x4.mul(yyyy, SIMD.Float32x4.load(Tx, 4)));
  34. JavaScript
  35.  
  36. src/benchmarks/transpose4x4.js
  37. Showing the top two matches. Last indexed on Sep 30, 2015.
  38. var tmp01;
  39. var tmp23;
  40.  
  41. tmp01 = SIMD.Float32x4.select(sel_ttff, src0, SIMD.Float32x4.swizzle(src1, 0, 0, 0, 1));
  42. tmp23 = SIMD.Float32x4.select(sel_ttff, src2, SIMD.Float32x4.swizzle(src3, 0, 0, 0, 1));
  43. JavaScript
  44.  
  45. src/benchmarks/shiftrows.js
  46. Showing the top match. Last indexed on Sep 30, 2015.
  47. SIMD.Int32x4.store(state, 4, SIMD.Int32x4.swizzle(rx4, 1, 2, 3, 0));
  48. }
  49. else if (r == 2) {
  50. SIMD.Int32x4.store(state, 8, SIMD.Int32x4.swizzle(rx4, 2, 3, 0, 1));
  51. }
  52. else { // r == 3
  53. SIMD.Int32x4.store(state, 12, SIMD.Int32x4.swizzle(rx4, 3, 0, 1, 2));
  54. JavaScript
  55.  
  56. src/ecmascript_simd.js
  57. Showing the top two matches. Last indexed 22 days ago.
  58. type.fn.extractLane(a, i) : type.fn.extractLane(b, i);
  59. }
  60. return simdCreate(type);
  61. }
  62.  
  63. function simdSwizzle(type, a, indices) {
  64. a = type.fn.check(a);
  65. // Miscellaneous functions that aren't easily parameterized on type.
  66.  
  67. if (typeof SIMD.Float32x4.swizzle === "undefined") {
  68. SIMD.Float32x4.swizzle = function(a, s0, s1, s2, s3) {
  69. JavaScript
  70.  
  71. src/ecmascript_simd_tests.js
  72. Showing the top match. Last indexed 2 hours ago.
  73. checkValue(type, result, function(index) { return index == i ? av : bv; });
  74. }
  75. }
  76.  
  77. function testSwizzle(type) {
  78. equal('function', typeof type.fn.swizzle);
  79. var a = createTestValue(type); // 0, 1, 2, 3, 4, 5, 6, ...
  80. var indices = [];
  81. HTML
  82.  
  83. tc39/spec.html
  84. Showing the top two matches. Last indexed 2 hours ago.
  85. <li>v0.8.2: Remove unsignedExtractLane, remove equals, notEquals, swizzle and shuffle from boolean vectors, improve internal algorithm notation, restrict rest argument usage, toString `", "`</li>
  86. This definition uses `<` and `>` to refer to the abstract operation defined by <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-abstract-relational-comparison">ES2015 7.2.11 (Abstract Relational Comparison)</a>
  87. </emu-note>
  88. </emu-clause>
  89.  
  90. <emu-clause id="swizzle">
  91. <h1>_SIMD_Constructor.swizzle( a, ...lanes )</h1>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement