From 6f09d3a67d333d68e7c971147ec77600e86e93f3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 8 Jul 2008 07:56:01 +0000 Subject: - many updates after Cwise change - fix compilation in product.cpp with std::complex - fix bug in MatrixBase::operator!= --- demos/mandelbrot/mandelbrot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'demos') diff --git a/demos/mandelbrot/mandelbrot.cpp b/demos/mandelbrot/mandelbrot.cpp index 2aaeab1e5..c363b4543 100644 --- a/demos/mandelbrot/mandelbrot.cpp +++ b/demos/mandelbrot/mandelbrot.cpp @@ -87,13 +87,13 @@ template void MandelbrotThread::render(int img_width, int img_hei { # define ITERATE \ pzr_buf = pzr; \ - pzr = pzr.cwiseAbs2() - pzi.cwiseAbs2() + pcr; \ - pzi = 2 * pzr_buf.cwiseProduct(pzi) + pci; + pzr = pzr.cwise().square() - pzi.cwise().square() + pcr; \ + pzi = (2*pzr_buf).cwise()*pzi + pci; ITERATE ITERATE ITERATE ITERATE } - pix_dont_diverge = (pzr.cwiseAbs2() + pzi.cwiseAbs2()) + pix_dont_diverge = ((pzr.cwise().square() + pzi.cwise().square()) .eval() // temporary fix as what follows is not yet vectorized by Eigen - .cwiseLessThan(Packet::constant(4)) + .cwise() <= Packet::constant(4)) // the 4 here is not a magic value, it's a math fact that if // the square modulus is >4 then divergence is inevitable. .template cast(); -- cgit v1.2.3