@Patrick The article for OpenMP was published.
i came across an article at Code Project(implementation with C Sharp) where they have mentioned a way to implement parallel programming(multi threading interface) similar to OpenMp using anonymous delegates and using statements.is it the only way by which we can implement OpenMP style multithreading or we can use WinRT(Implementation with C Sharp) to get the same results.Or we can use the API directly to get access to C++ library(adding references...)
Patrick,Can we use Delegates in C Sharp to implement OpenMP?
If I understand your question, I don't know why you ask on an Intel forum. C# provides for "unmanaged" native code generated by a C++ compiler, which could include OpenMP or Cilk+. As this hasn't gained much popularity on IA platforms, I wouldn't bet on anyone supporting it for the RT target. Anyway, as a major purpose of the Intel software tools is to enhance the advantage of IA platforms, I can't see RT support happening here.
>>...Or we can use the API directly to get access to C++ library...
Could you specify more clearly: What API do you mean and which C++ library do you want to use?
@Sergey I am willing to make an App for Ultrabook and I am fond of C # and I came across that OpenMP have released a version 4.0.Now i am willing to use it making Desktop App that showcases the Multithreading usages as well as perform some simple microinstructions in a simple manner.Can anybody put an Insight how to use OpenMP(will it require some encapsulation).i am trying to use the OpenMP API as WinRT APIs are included.I am willing to experiment.Thanks for your reply.
Hi, Thanks for the explanations.
>>...Can anybody put an Insight how to use OpenMP(will it require some encapsulation).i am trying to use the OpenMP API as
>>WinRT APIs are included.I am willing to experiment.
I have a very limited experience with .NET and I think you need to implement:
- a pure C/C++ DLL that exposes some API, or
- a COM object as a DLL or Exe, or an ActiveX control as a DLL, that expose some COM-interface(s)
that uses some OpenMP functionality and then the component has to be used in a .NET application. There are NO any limitations here and you really need to try to implement some of these solutions.
>>...Can we use Delegates in C Sharp to implement OpenMP?
Yes and you need to follow MSDN recommendations. Please take a look at:
C++ Language Reference 'How to: Define and Use Delegates'
I am trying different ways and i gues Cilk++ is the best solution now.Using the DLL and invoking either by P Invoke or including the dll in the form may work.I am experimenting soon i will post if i get a better solution.Any ways Thanks for your prompt reply.
>>...I am trying different ways and i gues Cilk++ is the best solution now...
That looks very interesting. I know that some companies are very surprized when they see very unusual ways of integration of their APIs, COM objects, etc.
Please take into account that OpenMP library implemented by Microsoft has some limitations and I post some details later.
@Sergev Yes I am trying.Today i got an error while some experimentation,I tried using Cilk++ with Visual Studio 2010 ,while changing the *.CS file extension to *.CILK it doesnot work. I will try different ways and will update as soon i get anything positive.
>>...Please take into account that OpenMP library implemented by Microsoft has some limitations and I post some details later.
Forum topic: Couldn't create more than 64 OpenMP threads in a test application
Forum topic: Relationship between number of threads in OpenMP application and memory used
Forum topic: Is it possible to change a default priority of an OpenMP thread?
>>...Please take into account that OpenMP library implemented by Microsoft has some limitations...
If you really want to push hard OpenMP you will need to use Intel OpenMP libraries ( included with many Intel software products, like Intel C++ compiler, Intel IPP library, Intel MKL, etc ). Take a look, please:
Forum topic: Stress testing of Intel OpenMP library - More than 18,600 OpenMP threads created in a parallel region
Forum topic: Couldn't create more than 981 OpenMP threads with Intel(R) C++ Composer XE 12 Update 9 - RESOLVED - more than 18,607 threads created
Related posts for review: