37#include "ramCanvas.hpp"
41 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
42 mjr::ramCanvas3c8b::csIntType count;
43 const int NUMITR = 1024;
44 std::complex<double> c, z, zero(0.0, 0.0);
45 mjr::ramCanvas3c8b theRamCanvas(7680, 7680, -2.2, 0.8, -1.5, 1.5);
47#pragma omp parallel for private(c, z, count) schedule(static,1)
48 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
49 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
50 for(c=std::complex<mjr::ramCanvas3c8b::coordFltType>(theRamCanvas.int2realX(x),theRamCanvas.int2realY(y)),z=zero,count=0; (std::norm(z)<4)&&(count<=NUMITR); count++,z=z*z+c)
53 theRamCanvas.drawPoint(x, y, mjr::ramCanvas3c8b::colorType::csCColdeFireRamp::c(
static_cast<mjr::ramCanvas3c8b::csIntType
>(mjr::math::ivl::wrapCC(count*20, 767))));
56 theRamCanvas.writeTIFFfile(
"mandelbrot_bm_cplx_openmp.tiff");
57 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
58 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])