@@ -63,8 +63,8 @@ fn parallel_starts_ends[
6363
6464 # Create the buffers
6565 var host_buffer_create_start = perf_counter()
66- for ctx in ctxs:
67- ctx[] .set_block_info(
66+ for ref ctx in ctxs:
67+ ctx.set_block_info(
6868 targets_per_device,
6969 len (matcher.encoded_pattern()),
7070 matcher.matrix_len(),
@@ -74,10 +74,10 @@ fn parallel_starts_ends[
7474 settings.sg_ends_free,
7575 max_target_length = max_target_length,
7676 )
77- ctx[] .host_create_input_buffers()
77+ ctx.host_create_input_buffers()
7878
7979 for ctx in ctxs:
80- ctx[] .synchronize()
80+ ctx.synchronize()
8181 var host_buffers_created = perf_counter()
8282 Logger.timing(
8383 " Host buffer creation time:" ,
@@ -108,16 +108,16 @@ fn parallel_starts_ends[
108108 Logger.timing(" Buffer fill time:" , buffers_filled - buffer_fill_start)
109109
110110 # Launch Kernel
111- for ctx in ctxs:
112- ctx[] .device_create_input_buffers()
113- ctx[] .copy_inputs_to_device()
114- ctx[] .device_create_output_buffers()
111+ for ref ctx in ctxs:
112+ ctx.device_create_input_buffers()
113+ ctx.copy_inputs_to_device()
114+ ctx.device_create_output_buffers()
115115 Logger.debug(" Created device output buffers" )
116- ctx[] .launch_kernel()
116+ ctx.launch_kernel()
117117 Logger.debug(" Launched kernel" )
118- ctx[] .host_create_output_buffers()
118+ ctx.host_create_output_buffers()
119119 Logger.debug(" Created host output buffers" )
120- ctx[] .copy_outputs_to_host()
120+ ctx.copy_outputs_to_host()
121121
122122 # Process the long seqs
123123 var cpu_start = perf_counter()
@@ -127,7 +127,7 @@ fn parallel_starts_ends[
127127
128128 # Get outputs
129129 for ctx in ctxs:
130- ctx[] .synchronize()
130+ ctx.synchronize()
131131 # ctx[].copy_outputs_to_host()
132132 var gpu_done = perf_counter()
133133 Logger.timing(" GPU processing time (with cpu):" , gpu_done - buffers_filled)
@@ -141,14 +141,14 @@ fn parallel_starts_ends[
141141 total_items = 0
142142 for ctx in ctxs:
143143 var end = min (
144- total_items + ctx[] .block_info.value().num_targets, len (seqs)
144+ total_items + ctx.block_info.value().num_targets, len (seqs)
145145 )
146146 var starts_start = perf_counter()
147147 cpu_parallel_starts[where_computed = WhereComputed.Gpu](
148148 matcher,
149149 settings,
150- ctx[] .host_scores.value().as_span().get_immutable(),
151- ctx[] .host_target_ends.value().as_span().get_immutable(),
150+ ctx.host_scores.value().as_span().get_immutable(),
151+ ctx.host_target_ends.value().as_span().get_immutable(),
152152 seqs[total_items:end],
153153 outputs,
154154 total_items,
0 commit comments