Home Neural Network Sudden modifications to variables when calling capabilities in C++ dynamic linked libraries

Sudden modifications to variables when calling capabilities in C++ dynamic linked libraries

0
Sudden modifications to variables when calling capabilities in C++ dynamic linked libraries

[ad_1]

Hello there,

    I am attempting to make use of the GPU to parallelize a few of the code in a Fortran program. However once I known as a operate within the C++ dynamic hyperlink library, I discovered that some variable values inside Fortran had modified.  With a small take a look at(linked under), I discovered that the deal with of the variable in Fortran overlapped with the deal with of the member variable within the object in C. I need to know why such reminiscence errors happen and the way I can keep away from them.

Jiayu_Leng_0-1705480747014.pngJiayu_Leng_1-1705480817887.png

 

Surroundings:

I am constructing C libraries with Visible Studio 17 2022

Fortran program with Visible Studio 14 2015 and parallel_studio_ex_2016

[ad_2]