arrayfire / arrayfire-dotnet

.NET wrapper for ArrayFire
BSD 3-Clause "New" or "Revised" License
78 stars 21 forks source link

Upgrade ArrayFire to .NET Standard 2.0. #12

Closed Oceania2018 closed 5 years ago

Oceania2018 commented 5 years ago

HelloWorld to .NET Core 2.2 Unified to .NET Core 2.2 F# project to .NET Framework 4.7

9prady9 commented 5 years ago

Thank you for contributing to this wrapper.

I am not familiar with .NET details, isn't the file ArrayFire.csproj required anymore? - I see it is has been significantly modified and another Wrapper/Properties/AssemblyInfo.cs removed altogether, what role did it play earlier and what takes care of that now ?

Oceania2018 commented 5 years ago

.NET Core is changed totally, it's cross-platform, run on Windows, Linux and MacOS. AssemblyInfo.cs is not needed anymore. You can clone my branch to run it before merging.

https://docs.microsoft.com/en-us/dotnet/standard/net-standard https://docs.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server

9prady9 commented 5 years ago

@Oceania2018 Thank you for the explanation. I will try it out and merge it as soon as I can.

9prady9 commented 5 years ago

@Oceania2018 Thanks once again, I was able to build it successfully.

I have request if you are interested in it.

I see that the Config.fs uses hard coded paths to find arrayfire include. I don't see AF_PATH environment being used at all. Are you interested in contributing the changes that look for AF_PATH environment variable when available ?

Oceania2018 commented 5 years ago

@9prady9, I’m not familiar with F#, but I can try. What does AutoGen do? Does it only generate then dll entry interface?

9prady9 commented 5 years ago

@Oceania2018 I have no clue, in fact. I am just running on general Windows knowledge to test your changes earlier and that worked there. @royalstream Is the developer who originally started working on this wrapper. Perhaps he can answer your Qs.

royalstream commented 5 years ago

@Oceania2018 if you look inside the Wrapper/Interop folder and you see the code for all the AF*.cs files you'll notice they're pretty repetitive. I hate doing repetitive things by hand, so I wrote a F# program to do it for me using the C++ headers as the starting point. It could have been a Python script but at the time I settled for F#. For the sake of completeness I decided to share this tool it in the AutoGenTool folder. But the AutoGenTool is not part of the library, it's just a helper tool I used to generate some of the library's source code.

Oceania2018 commented 5 years ago

@royalstream Thanks for your explanation.