bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: current development


From: Joseph Heled
Subject: Fwd: current development
Date: Wed, 4 Dec 2019 11:08:22 +1300

---------- Forwarded message ---------
From: Joseph Heled <address@hidden>
Date: Wed, 4 Dec 2019 at 11:07
Subject: Re: current development
To: Russ Allbery <address@hidden>


Yes, I assumed GNUBG is not ready yet, but was not sure if you can
actually compile a (say) version with SSE2 and AVX support which will
run as long as the binary does not use those instructions??

On Wed, 4 Dec 2019 at 11:04, Russ Allbery <address@hidden> wrote:
>
> Joseph Heled <address@hidden> writes:
>
> > I fully appreciate your plight as a package maintainer, but I think that
> > users which use rollouts, a quite important GNUBG feature, care a *lot*
> > about speed.
>
> > Perhaps the GNUBG code can be structured in a way that it can be
> > compiled with all those "advance features", yet they are used *only* in
> > rollouts and so everything else works on older systems?
>
> > Is that possible or am I just showing my ignorance?
>
> I don't see an obvious reason why it wouldn't be possible, although this
> is currently not what gnubg does.
>
> #if defined(USE_SIMD_INSTRUCTIONS)
>         result = SIMD_Supported();
>         switch (result) {
>         case -1:
>             outputerrf(_("Can't check for SIMD support\n"));
>             break;
>         case -2:
>             outputerrf(_("No cpuid check available\n"));
>             break;
>         case 0:
>             /* No SIMD support */
>             break;
>         case 1:
>             /* SIMD support */
>             simderror = FALSE;
>             break;
>         default:
>             outputerrf(_("Unknown error while doing SIMD support test\n"));
>         }
>
>         if (simderror) {
> #if defined(USE_AVX)
>             outputerrf(_
>                        ("\nThis version of GNU Backgammon is compiled with 
> AVX support but this machine does not support AVX\n"));
> #else
>             outputerrf(_
>                        ("\nThis version of GNU Backgammon is compiled with 
> SSE support but this machine does not support SSE\n"));
> #endif
>             exit(EXIT_FAILURE);
>         }
> #endif
>
> In other words, it checks at runtime if built with AVX to confirm that AVX
> is supported and, if not, it terminates the program.  I could define
> DISABLE_SIMD_TEST; then, I'm not sure what behavior it would have.
>
> --
> Russ Allbery (address@hidden)             <https://www.eyrie.org/~eagle/>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]