StevenLOL / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 1 forks source link

Add Parallel Processing in method “Comput” of class "AForge.Neuro.Layer". #351

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Describe the feature you are interested and which may bring benefit to the
project ...

When run aforge on multicore CPU, we can create more thread match with the 
number of logic cores.
Since the calculation for each neuron are same and independent, if create more 
thread, the speed will be accelerated.

Provide any references/links to publications/algorithms/etc. which could
help in development ...

In my local testing, I have create two thread, each one has its own output 
array(double[1500]).
I also duplicate the input array(double[3000]) for each thread.
And totally 3000 neurons in a layer.

The code will copy two output results(double[1500]) into one double[3000] for 
return.

The result is the time will 40% decreased.

I haven't tested that whether all copies of input and output array are 
necessary.
Maybe it will not affect the performance.

Original issue reported on code.google.com by ChinaTo...@gmail.com on 29 Jul 2013 at 1:27