public void ForAll(EditItemDelegate action) { for (int i = 0; i < buffer.Length; i++) { action(ref buffer.Span[i]); } }
public void ForAllParallel(EditItemDelegate a) { blocks.AsParallel().ForAll(block => { for (int i = block.pos; i < block.length + block.pos; i++) { a(ref buffer.Span[i]); } }); }