Yes, you can use the host_data
construct to do this. Here's an example of how to call cublasSaxpy from OpenACC:
#pragma acc data create(x[0:n]) copyout(y[0:n])
{
#pragma acc kernels
{
for( i = 0; i < n; i++)
{
x[i] = 1.0f;
y[i] = 0.0f;
}
}
#pragma acc host_data use_device(x,y)
{
cublasSaxpy(n, 2.0, x, 1, y, 1);
}
}
I have other examples in an an article I wrote about OpenACC interoperability a few months ago. You can find it at http://www.pgroup.com/lit/articles/insider/v5n2a2.htm .