prefetch starting at hint

This commit is contained in:
2019-12-10 22:11:22 -05:00
parent 01b7afb52c
commit 0473bffa30

View File

@@ -131,13 +131,14 @@ bool add_coset(
int *coset, int *coset,
int *hint, int *hint,
thrust::device_vector<int> &dcosets) { thrust::device_vector<int> &dcosets) {
thrust::host_vector<int> cosets = dcosets; int offset = *hint;
*coset = cosets.size() / ngens; thrust::host_vector<int> cosets(dcosets.begin() + offset, dcosets.end());
*coset = dcosets.size() / ngens;
// todo: this part especially. // todo: this part especially.
while (cosets[*hint] >= 0) { while (cosets[*hint - offset] >= 0) {
*hint = *hint + 1; *hint = *hint + 1;
if (*hint >= cosets.size()) if (*hint - offset >= cosets.size())
return true; return true;
} }
int from = *hint / ngens; int from = *hint / ngens;