Status: New
Owner: [email protected]
Labels: Type-Bug Priority-Medium

New issue 2954 by [email protected]: navier-stokes.js: fishy loop in set_bnd function
http://code.google.com/p/v8/issues/detail?id=2954

The code in the set_bnd function in navier-stokes.js has a loop that looks weird:

  for (var j = 1; i <= height; i++) {
    x[j * rowSize] = -x[1 + j * rowSize];
    x[(width + 1) + j * rowSize] = -x[width + j * rowSize];
  }

https://code.google.com/p/v8/source/browse/branches/bleeding_edge/benchmarks/navier-stokes.js#96

It looks like this could be a bug in the benchmark and the original code the benchmark is based on. Without knowing too much about the algorithm implemented, I would assume the code should be changed to count on j and check j against height in the loop condition:

  for (var j = 1; j <= height; j++) {
    x[j * rowSize] = -x[1 + j * rowSize];
    x[(width + 1) + j * rowSize] = -x[width + j * rowSize];
  }


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to