Welcome to Foxite.COM Community Weblog Sign in | Join | Help

Parallel Extentions of .Net and Velocity Code Name (Net Rocks)

With VB2008 the bits are optimised to user multy-core processors however MS are thinking what we can manage our personal code to build special algorithms, also, we will development intuitively or with special functions to get full full the production of multy-core processors.

With Parallel extentions for example we can execute a For loop into pararel consum all process core and their full power.

For example:

In single Process:

Dim result = New Matrix(Of Double)(m1.Rows, m2.Columns)

   For i = 0 To m1.Rows - 1

      For j = 0 To m2.Columns - 1

         result(i, j) = 0

            For k = 0 To m1.Columns - 1

               result(i, j) += m1(i, k) * m2(k, j)

            Next

           Next

      Next

Return result

In Parallel Process:

   Dim result = New Matrix(Of Double)(m1.Rows, m2.Columns)

   Parallel.For(0, m1.Rows, Function(i) MultiplyParallelInner(i, m1, m2, result))

   Return result

---Multiply parallel function

   For j = 0 To m2.Columns - 1

         result(i, j) = 0

            For k = 0 To m1.Columns - 1

               result(i, j) += m1(i, k) * m2(k, j)

            Next

         Next

Return True

On my machine the I have arround 150% more speed into the process executed with Parallel extentions.

For mor information you can see here.

Download the CTP here.

(In many cases I think, what will happen if VFP go to into .net? really it's will very crazy, will very good .... :-), however now with VB2008 we will have all power of the VFP Team+)

Best Regards,

Franklin Garzón

MVP Visual FoxPro

Published Sunday, June 08, 2008 11:17 AM by frankling
Filed Under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

What do you think?

(required) 
required 
(required)