Microsoft Accelerator library with Visual Studio F#

走远了吗. 提交于 2019-12-12 00:49:48

问题


I've downloaded and installed Microsoft Accelerator as stated in the manual, but when I try to create a project that uses open Microsoft.ParallelArrays, ParallelArrays is still not defined.

I tried going through the References to add Accelerator to the list but could not seem to find it.

What am I doing wrong?

Edit:

I have found a file in another location that does work, but when I compile and run my test program it throws the error

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'Accelerato
r.dll': The specified module could not be found. (Exception from HRESULT: 0x8007
007E)
   at Microsoft.ParallelArrays.FloatParallelArray.AcceleratorNative.Create_FPA_F
A1D(Single[] values, IntPtr Length)
   at Microsoft.ParallelArrays.FloatParallelArray..ctor(Single[] values)
   at Program.Test1() in c:\users\misao\documents\visual studio 2012\Projects\ac
celeratortest\acceleratortest\Program.fs:line 10
   at <StartupCode$acceleratortest>.$Program.main@() in c:\users\misao\documents
\visual studio 2012\Projects\acceleratortest\acceleratortest\Program.fs:line 97
Press any key to continue . . .

回答1:


Add the dll 'Accelerator.dll' to your project. Right click on the project, Add / Existing Item. Then set this files 'Copy To Output' property to Copy Always.




回答2:


The easiest way is to copy the DLL in your executable directory is still the best way to make it work without a problem for you, and especially avoid awful post : "System.DllNotFoundException: Unable to load DLL 'Accelerato r.dll'"



来源:https://stackoverflow.com/questions/16247395/microsoft-accelerator-library-with-visual-studio-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!