Optimizing C# programs for Multi-Processors/ DualCore

G

Guest

Hello,

is there a way to optimize loops (f.e. matrix operations) for multi
processor systems with C#?

I´m searching for something like OpenMP, which is available for C/C++
but not for C#.

Or isn´t there any way to optimize it with C#?

Do I have to outsource my matrix operation into a C/C++ DLL using OpenMP?


Regards,

Martin
 
J

james.curran

Martin said:
is there a way to optimize loops (f.e. matrix operations) for multi
processor systems with C#?

In theory, this should be handled by the JITer (so that one assembly
could take advantage of the multiple processors when run on a system
that had them, while still running on a single processor PC)

In reality, I have no idea if such a JITer exists (but I doubt it).
 
C

Carl Daniel [VC++ MVP]

In theory, this should be handled by the JITer (so that one assembly
could take advantage of the multiple processors when run on a system
that had them, while still running on a single processor PC)
In reality, I have no idea if such a JITer exists (but I doubt it).

Not in .NET. There's no automatic vectorzation of loops and no support for
OpenMP, which would let you write parallel loops directly.

-cd
 
C

Carl Daniel [VC++ MVP]

Martin Pöpping said:
Hello,

is there a way to optimize loops (f.e. matrix operations) for multi
processor systems with C#?

I´m searching for something like OpenMP, which is available for C/C++ but
not for C#.

Or isn´t there any way to optimize it with C#?

Do I have to outsource my matrix operation into a C/C++ DLL using OpenMP?

That would be a viable route. Personally, I'd probably try that route
before the alternative: writing it yourself for .NET.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top