error error C1083: cannot open include file: "gpu/mxGPUArray.h": No such file or directory

Cause of the problem: The matlab version is too high, (MatlabDir)\extern\include, "gpu/mxGPUArray.h" does not exist in this path, this file has been moved to (MatlabDir)\toolbox\distcomp\gpu\extern\include path Down. Two solutions
Method 1: Modify the CommonSettings.props configuration as follows:

<PropertyGroup Condition="'$(MatlabSupport)'=='true'">  
    <MatlabDir>E:\02_software\01_develop\matlab</MatlabDir>  
    <LibraryPath>$(MatlabDir)\extern\lib\win64\microsoft;$(LibraryPath)</LibraryPath>  
    <IncludePath>$(MatlabDir)\extern\include;$(MatlabDir)\toolbox\distcomp\gpu\extern\include;$(IncludePath)</IncludePath>
    <!-- 增加一个$(MatlabDir)\toolbox\distcomp\gpu\extern\include; -->  
</PropertyGroup> 

Method 2: Create a "gpu" folder under the (MatlabDir)\extern\include path and then copy the mxGPUArray.h file under (MatlabDir)\toolbox\distcomp\gpu\extern\include\gpu to the created gpu. Can.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325561920&siteId=291194637