POV-Ray : Newsgroups : povray.programming : qtpovray : Re: qtpovray Server Time
8 Feb 2023 09:17:24 EST (-0500)
  Re: qtpovray  
From: clipka
Date: 11 Jun 2018 04:18:10
Message: <5b1e3042@news.povray.org>
Am 11.06.2018 um 06:38 schrieb dick balaska:
> On 05/21/2018 04:10 AM, clipka wrote:
>> Am 21.05.2018 um 00:43 schrieb dick balaska:
>>> I have no idea no to get qmake to do super-optimization,
> Thank you for the super documentation.  I have libplatform.a built.  I
> can't really tell if it's doing anything. I'm going to have to wire up
> the benchmark.

Wiring up the benchmark shouldn't actually be necessary, provided your
variant of POV-Ray spits out the usual version and copyright information
(see `InitInfo()` in `renderfrontend.cpp`; BTW, if your variant of
POV-Ray does /not/ spit out that information, it would be in violation
of some of the 3rd party libraries' licensing conditions.)

If you got the optimization framework up and running, the last portion
in that section will read something like this:

Dynamic optimizations:
  CPU detected: Intel,SSE2,AVX,AVX2,FMA3
  Noise generator: avx2fma3-intel (hand-optimized by Intel)

If the section is missing entirely, the optimized noise framework is
disabled entirely.

If the section is present but reports "Noise generator: generic
(portable)", then the framework /per se/ is working, but the individual
optimizations (or at least those that would fit your CPU) are all disabled.

> So, I just build those files and it magically works?  There's an awful
> lot of #ifdefs that look like they want some service somehow.

Define this to the header file (if any required) that enables
machine-specific compiler intrinsics for extended instructions. E.g. for
GCC this needs to be `<x86intrin.h>`, while for MS Visual Studio this
needs to be `<intrin.h>`.


Define these depending on which instruction set extensions the
/compiler/ supports.

These should be (un)defined globally for all source files. If for some
reason the decision to enable or disable a particular noise generator
can't be made globally, do define `TRY_OPTIMIZED_NOISE_XXX` globally,
but define `DISABLE_OPTIMIZED_NOISE_XXX` when compiling xxxnoise.cpp if
it turns out that the required instruction set extension isn't supported
after all. However, this non-global mechanism is inferior, and should be
avoided if possible.

Also, don't forget `TRY_OPTIMIZED_NOISE`, which must be defined
identically for all source files, serving as the master switch to turn
on the optimized noise framework /per se/.

Another set of macros used in conjunction with the optimized noise
framework are the `POV_CPUINFO`, `POV_CPUINFO_DETAILS` and
`POV_CPUINFO_H` macros, but these are primarily for diagnostic purpose.
If you omit them, the "Dynamic optimizations:" section will not report
"CPU detected:", but the optimized noise framework should still work fine.

Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.