Software Archive
Read-only legacy content
17061 Discussions

How to use a public function of a class?

王__云飞
Beginner
441 Views

In my C++ program, I use some public functions of some classes in the offload region.I use the statement __attribute ((target(mic))) before the functions. But I found that the program crushed when it goes through the offload regions which use public functions of classes.

So I wonder that if there are some special things to care when I use functions of a class? Is my way correct? 

Thank you very much.

0 Kudos
1 Reply
Charles_C_Intel1
Employee
441 Views

My understanding is that classes are all-or-nothing.   The entire class needs to be marked for offload, even if you are only using a few methods in it.

Charles

0 Kudos
Reply