void mandelbrot_cpu_seq(Extent ext, int* dest, const int max_iter, Rectangle mi) { for (int y = 0; y < ext.get_height(); y++) { for (int x = 0; x < ext.get_width(); x++) { const int i = ext.checked_index(x, y); const float x0 = scale(x, ext.get_width(), mi.x0, mi.x1); const float y0 = scale(y, ext.get_height(), mi.y0, mi.y1); dest[i] = mandelbrot(x0, y0, max_iter); } } }