- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does anyone have experience with or can reference some sample code or documenton how to
share a Fortran memory spacefrom withina .NET C#program.Basically we have some large
arrays that we would rather not pass from one to the other but simply populate withFortran
and use inC# (or Java)
share a Fortran memory spacefrom withina .NET C#program.Basically we have some large
arrays that we would rather not pass from one to the other but simply populate withFortran
and use inC# (or Java)
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tsmithapp-geo-research.com
Does anyone have experience with or can reference some sample code or documenton how to
share a Fortran memory spacefrom withina .NET C#program.Basically we have some large
arrays that we would rather not pass from one to the other but simply populate withFortran
and use inC# (or Java)
share a Fortran memory spacefrom withina .NET C#program.Basically we have some large
arrays that we would rather not pass from one to the other but simply populate withFortran
and use inC# (or Java)
I have never tested to exchange pointer adresses between C# and Fortran (thats what you intend to do, right?).
But if you even succeed in doing so, you have to keep in mind that Fortran and C# are saving arrays differently (one in column order, the other in row order...).
Markus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - onkelhotte
I have never tested to exchange pointer adresses between C# and Fortran (thats what you intend to do, right?).
But if you even succeed in doing so, you have to keep in mind that Fortran and C# are saving arrays differently (one in column order, the other in row order...).
Markus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you declare an array via iso_c_binding, it will appear the same as an array declared in unmanaged C code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My understanding is that C# runs only in the .NET environment so that it does not share memory with unmanaged code. You should use access routines in a DLL to share data.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page