Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Can DPC++ programs be compiled into *.so and called by C?

di__liu
Beginner
978 Views

Our network equipment wants to use the FPGA card to do some traffic analysis.

Since our protocol stack is implemented in C , we want to use FPGA by calling a DPC ++ function from a C program.

Is this feasible?

Thanks!

0 Kudos
4 Replies
RahulV_intel
Moderator
978 Views

Hi,

Thanks for reaching out to us. We will get back to you soon.

 

Rahul

0 Kudos
Varsha_M_Intel
Employee
978 Views

Hi,

You should be able to create a .so file from dpcpp programs and called from C. You will need to export the function as "C" to be called by C.

https://docs.microsoft.com/en-us/cpp/build/exporting-cpp-functions-for-use-in-c-language-executables?view=vs-2019.

-Varsha

0 Kudos
di__liu
Beginner
978 Views

Thanks!

I will try it.

0 Kudos
MaheshB_Intel
Moderator
790 Views

 Hi,

As we have not heard back from you, we are considering that your issue has been resolved and we have answered all your queries. So we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only

Have a Good day!


0 Kudos
Reply