@threads :dynamic for tid in 1:nthreads()
for index_pos in owned_indices[tid]
index = indices[index_pos]
result_matrix[index, tid] += some_big_calculation(x[index])
end
end
4 Likes