• Austin Clements's avatar
    runtime: use threads slice in parfor instead of unsafe pointer math · 8e2bb7bb
    Austin Clements authored
    parfor originally used a tail array for its thread array.  This got
    replaced with a slice allocation in the conversion to Go, but many of
    its gnarlier effects remained.  Instead of keeping track of the
    pointer to the first element of the slice and using unsafe pointer
    math to get at the ith element, just keep the slice around and use
    regular slice indexing.  There is no longer any need for padding to
    64-bit align the tail array (there hasn't been since the Go
    conversion), so remove this unnecessary padding from the parfor
    struct.  Finally, since the slice tracks its own length, replace the
    nthrmax field with len(thr).
    
    Change-Id: I0020a1815849bca53e3613a8fa46ae4fbae67576
    Reviewed-on: https://go-review.googlesource.com/3394Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    8e2bb7bb
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...