| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Switching the Sync impl from ArrayParts to ArrayRef should allow this to pass the tests. |
Sorry, something went wrong.
|
@akern40 ArrayRef is your work. You're the best person around to know if we actually need this change. I'm really surprised that this bug didn't appear during your refactor. We have plenty of parallel code and tests in this repo. |
Sorry, something went wrong.
|
I’m not that surprised that it didn’t show up because while it doesn’t prevent this fn test1(a: &ArrayRef1<f64>) { // works
Zip::from(a).par_for_each(|v| {
let _ = v;
});
}
it does prevent doing this (which is much less common) fn test2(a: &ArrayRef1<f64>) { // does not compile
let b = array![0.];
Zip::from(&b).par_for_each(|_| {
let _ = a.len();
});
}
My rational is that since both of those examples work with ArrayView (I guess because ArrayView inherit the Sync impl from ArrayBase) this should also work with ArrayRef. |
Sorry, something went wrong.
|
Also I saw that Send is implemented on ArrayBase, if this PR is accepted maybe Send should also be implemented on ArrayRef. |
Sorry, something went wrong.
|
Ya I was surprised as well. I think this is good to go, but can you add Send as well in this PR? |
Sorry, something went wrong.
|
@gaumut thank you very much for your contribution, and @nilgoyette thank you as always for staying on top of PRs! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #1548