Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

Fortran Calling C Offloaded Function

$
0
0

Hi Guys,

  I would like to know if it is possible to do a code like this:

!dir$ offload begin target (mic:0)

call C_SUBROUTINE(x, y)

!dir$ end offload

Where the subroutine code is:

__attribute__ ((target(mic:0)))
void c_subroutine_(float * __restrict x, float * __restrict y)
{  

(...)

}

Where x and y are arrays of floats. I've tried but I'm getting invalid pointer error when the subroutine is called, even including "!dir$ attributes offload:mic :: C_SUBROUTINE" inside the calling Fortran subroutine.


Viewing all articles
Browse latest Browse all 1347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>