bug-gnubg
[Top][All Lists]
Advanced

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

Re : [Bug-gnubg] USE_SSE2


From: Massimiliano Maini
Subject: Re : [Bug-gnubg] USE_SSE2
Date: Mon, 17 Aug 2009 08:24:44 -0700 (PDT)

Hmmm ... so at the moment we have two defines, USE_SSE_VECTORIZE
and USE_SSE2.

I see these are used not only in the files from the lib directory (neuralnet.c,
neuralnetsse.c, sse.h) but also in gnubg.c and eval.c.

In gnubg.c, it's just to diaply build information.
In eval.c it's to call the appropriate eval function (NeuralNetEvaluate or 
NeuralNetEvaluate128).

Questions:

1. I'm compiling with -msse (and/or -msse2) only the file neuralnetsse.c as I 
rememebr there
where issues compiling all gnubg source files with -msse. Is this still correct 
?

2. If yes, I would try to avoid compiling everything 3 times just because of 
one file.
Ideally I would create multiple version of libevent.a (one with nosse, one with 
sse, one with
sse2 and so on) and then generate different gnubg executables linking to the 
different libs.
This however would require that usage of USE_SSE_VECTORIZE and USE_SSE2 is 
limited
to source files in the lib directory. Can this be done ?
It's easy for the line in gnubg.c (no performance issues, just call a function 
that is in the library
that returns if sse/sse2/others are supported). Don't know for eval.c.

BTW, I've stumbled on this:

http://www.gamedev.net/reference/articles/article1987.asp

Relevant part:
"Compiling SSE2 with gcc/g++

The first thing that you need to remember to do when you want to compile SSE2 
embedded
C/C++ code with gcc/g++, is to throw in the -masm=intel switch during compile."

Is it realy necessary ?


Ingo also wrote:
>  =>  "gcc -mfpmath=sse -msse2 -msse" should be a no-brainer for the binary
>  distribution.

Do we need to put both -msse and -msse2 (when we want sse2) ? Cause the current 
win
makefile has only -msse2 ...


MaX.

>
>De : Jonathan Kinsey <address@hidden>
>À : address@hidden
>Cc : address@hidden; address@hidden
>Envoyé le : Lundi, 17 Août 2009, 13h55mn 48s
>Objet : Re: [Bug-gnubg] USE_SSE2
>
> >
>Note that I've changed this recently so it does check for sse2 (if use_sse2 is
>defined) and also it doesn't fallback gracefully if this check fails.
>
>So we should probably build a sse2 build and a non-sse build (maybe a non-sse
>build only occasionally?).
>
>Jon
>
>Michael Petch wrote:
>> On 17/08/09 5:29 AM, "Michael Petch"  wrote:
>> 
>>> I guess for completeness one might consider building a non-sse build for
>>> those system.
>>>
>> 
>> Time to go to bed:
>> 
>> I guess for completeness one might consider building an SSE  build for those
>> systems (with the -msse flag).
>> 
>> My opinion is that unless its asked for we might not want to bother.
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Bug-gnubg mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/bug-gnubg
>> 
>> 
>
>
>
>
>________________________________
Windows Live Messenger: Celebrate 10 amazing years with free winks and 
emoticons. Get Them Now

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail





reply via email to

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