[Top][All Lists]

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

Re: FW: [Bug-gnubg] Simple multi-threading... Cache

From: Øystein Johansen
Subject: Re: FW: [Bug-gnubg] Simple multi-threading... Cache
Date: Tue, 23 Jan 2007 15:14:39 +0100
User-agent: Thunderbird (Windows/20061207)

Jim Segrave wrote:
Just loking at neuralnetsse.c, and not burdening myself with acutally
understanding the neural net code itself, it looks like calls to
NeuralNetEvaluate128() take a flag with values NNEVAL_NONE,
calling with NNEVAL_NONE doesn't copy arInput[] to the neural net
savedBase, but simply calls Eval128().

Calling with NNEVAL_SAVE does copy arInput[] to the neuralnet
savedBase, then calls Evaluate128()

calling with NNEVAL_FROMBASE assumes that there is a savedBase for
this neural net and that it should be restored to arOutput, then used
to tweak the values of arInput before calling EvaluateFromBase128().

My first thought would be - does the multithreaded code have separate
copies of the savedBase struct for each of the neural nets? If not,
there will be unpleasant interactions.

You might be on to something. The stored input array and stored hidden layer value array is stored in a global array. If two threads call NNEVAL_SAVE the last one will overwrite the first saved arrays.


reply via email to

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