Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are actually two APIs:</p> <ol> <li>the River Trail API as described in the <a href="https://github.com/rivertrail/rivertrail/wiki/ParallelArray" rel="nofollow">GitHub prototype documentation</a></li> <li>the Parallel JavaScript API described in the <a href="http://wiki.ecmascript.org/doku.php?id=strawman%3adata_parallelism" rel="nofollow">ECMAScript proposal</a></li> </ol> <p>The two differ slightly, one difference being that the ECMAScript proposal no longer has a combine method but uses a flavor of map that offers the same functionality. Another difference is that the GitHub prototype uses index vectors whereas the proposal version uses multiple scalar indices. Your example, for the prototype, would be written as</p> <pre><code>var par_A = new ParallelArray([3,3], function(iv) {return iv[1]}); par_A.combine(2, function(i) {return this.get(i) + 1} ); </code></pre> <p>In the proposal version, you instead would need to write</p> <pre><code>var par_A = new ParallelArray([3,3], function(i,j) {return j}); par_A.map(2, function(e, i) { return this.get(i) + 1; }); </code></pre> <p>Unfortunately, multi-dimensional map is not yet implemented in Firefox, yet. You can watch bug 862897 on Mozilla's bug tracker for progress on that front.</p> <p>Although we believe that the API in the proposal is the overall nicer design, we cannot implement that API in the prototype for technical reasons. So, instead of evolving the prototype half way, we have decided to keep its API stable.</p> <p>One important thing to note: the web console in Firefox seems to always use the builtin version of ParallelArray and not the one used by a particular website. As a result, if you want to play with the GitHub prototype, you best use the interactive shell from our GitHub website.</p> <p>Hope this clears up the confusion.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload