• October 20, 2021, 03:31:04 AM

Author Topic:  Explore fractals (inflection tool)  (Read 5548 times)

0 Members and 1 Guest are viewing this topic.

Offline Microfractal

  • I like deep mandelbrot zooms!
  • Fractal Furball
  • ***
  • Posts: 229
Re: Explore fractals (inflection tool)
« Reply #45 on: October 13, 2021, 11:21:36 PM »
Sorry for the comment, but the rendering is glitchy (bad images) when 'toggle julia' is used...

Offline Dinkydau

  • Uploader
  • *
  • Posts: 301
    • DeviantART gallery
Re: Explore fractals (inflection tool)
« Reply #46 on: October 14, 2021, 01:10:29 AM »
Thanks for reporting that. It's useful information because I didn't know about the problem.

It's weird, because that's exactly the kind of problem the latest version fixed. Visual studio and g++ disagree on what the code means. I tested the program with visual studio and it works fine there. This is the first time I've had such a difference.

I just commented this part of Render.cpp out and replaced it by the same calculation in a slightly different way that I discarded earlier because it didn't work:

Code: [Select]
//todo: room for improvement; this compares all 4 pixels, which is unnecessary work, but I don't know how to make a normal double comparison with NaN result in true. This way with AVX does what is needed.
//pixel_has_escaped_v = _mm256_xor_pd(
// _mm256_cmp_pd(zisqr_plus_zrsqr_v, bailout_v, _CMP_LE_OQ)
// ,all_true
//);

pixel_has_escaped_p[8*k] =
zisqr_plus_zrsqr_p[8*k] >= bailout_p[0]
|| zisqr_plus_zrsqr_p[8*k] != zisqr_plus_zrsqr_p[8*k]; //nan

It turns out that breaks the program in visual studio and makes it work with g++. Annoying...

Offline pauldelbrot

  • 3f
  • ******
  • Posts: 3173
Re: Explore fractals (inflection tool)
« Reply #47 on: October 14, 2021, 01:40:14 AM »
Conditional compilation. Use preprocessor directives to make it use one version when compiled with Visual Studio and the other when compiled with g++.

Code: [Select]
#ifdef _MSC_VER
        // MS Visual Studio
        pixel_has_escaped_v = _mm256_xor_pd(
                _mm256_cmp_pd(zisqr_plus_zrsqr_v, bailout_v, _CMP_LE_OQ)
                ,all_true
        );
#else
        pixel_has_escaped_p[8*k] =
                zisqr_plus_zrsqr_p[8*k] >= bailout_p[0]
                || zisqr_plus_zrsqr_p[8*k] != zisqr_plus_zrsqr_p[8*k]; //nan
#endif

That should work on both. As written it will use the g++ version on any third compiler used, but it's far more likely Microsoft is the one being a maverick, so ...

Offline quaz0r

  • Fractal Feline
  • **
  • Posts: 185
Re: Explore fractals (inflection tool)
« Reply #48 on: October 14, 2021, 05:26:27 PM »
make life easy on yourself and use std::experimental::simd   8)


xx
ExploreFractals (inflection tool)

Started by Dinkydau on Downloads

0 Replies
116 Views
Last post March 26, 2021, 11:43:09 PM
by Dinkydau
clip
Conversion tool for Lyapunov parameter files

Started by marcm200 on Programming

1 Replies
329 Views
Last post January 29, 2019, 01:45:59 PM
by gerson
clip
Inflector Gadget - inflection mapping for complex quadratic polynomials

Started by claude on Other

6 Replies
883 Views
Last post December 14, 2017, 06:13:37 PM
by claude
xx
Fractals Made of Fractals

Started by AranLeer on Fractal Mathematics And New Theories

11 Replies
1098 Views
Last post August 29, 2021, 10:26:27 PM
by 3DickUlus
wink
Hi Fractals!

Started by awfulTHEfrac on Meet & Greet

1 Replies
382 Views
Last post December 01, 2019, 10:43:56 AM
by 3DickUlus