Commit 2dd5d785 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

BUG: ensure indices are large enough

parent fb4d6109
Pipeline #5309 passed with stage
in 2 minutes and 43 seconds
......@@ -624,6 +624,8 @@ __global__ void matrix_mult_nd_invert({dtype} *derparam, {dtype} *derfield, int
idx_req, idx_centroids = self.basis.within_range(request)
forward_compressed = sp.append(0, sp.cumsum(sp.bincount(idx_req, minlength=request.npos)))
forward_idx = idx_centroids # [sp.argsort(idx_req)]; idx_req is always sorted
if forward_compressed.size < self.request.npos + 1:
forward_compressed = np.append(forward_compressed, np.full(self.request.npos + 1 - forward_compressed.size, forward_compressed[-1], dtype=forward_compressed.dtype))
self.forward_idx = (cuda.to_gpu_correct(forward_compressed),
cuda.to_gpu_correct(forward_idx))
if only_forward:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment