Commit 061c0d6e authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

OPT: delete hidden request after use

parent dafddcfe
Pipeline #5302 failed with stage
in 7 minutes and 42 seconds
......@@ -660,7 +660,6 @@ __global__ void matrix_mult_nd_invert({dtype} *derparam, {dtype} *derfield, int
self.forward(*args, block=(cuda.nthreads, 1, 1),
grid=(int(sp.ceil(32 * self.request.npos / cuda.nthreads)), 1, 1))
def combine_results(self, inverse=False):
"""Retrieves the vector field at the requested positions as computed by evaluate_results
......@@ -676,6 +675,8 @@ __global__ void matrix_mult_nd_invert({dtype} *derparam, {dtype} *derfield, int
def update_pos(self, new_request):
new_arr = RadialGPUArrays.get(self.request)
if hasattr(self, 'hidden_request'):
del RadialGPUArrays.arrays[self.hidden_request]
if new_request.npos < self.request.npos:
new_arr = new_arr[:new_request.npos]
RadialGPUArrays.arrays[new_request] = new_arr
Supports Markdown
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