Double Free Error In Swift concurrentPerform
I have the following code for a sparse matrix times a vector. In the sparse matrix, the number of nonzero elements per row is stored, alongside the index in the array of elements at which the first element of that row occurs. These are used to ENSURE that no element of the output vector is written two by multiple threads at once. This code works fine when building without optimisations or when building in debug mode. However when I said the optimisation level to -Ofast, I get a double free error.