- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
I tried to use STL(vector) in offload mode . In fact it runs successfully.
But I still have a question, for example:
#pragma offload_attribute(push, target(mic) )
#include <vector>
#pragma offload_attribute(pop)
struct TA {
int a;
int b;
}
int main(int argc, char* argv[])
{
std::vector<TA> test_vec_ta;
Ta ta1(1, 2);
test_vec_ta.push_back(ta1);
#pragma offload target(mic)
{
std::vector<int> test_vec_int;
test_vec_int.push_back(11);
test_vec_int.push_back(22);
}
return 0;
}
When I compile, ICC has an error。This means that the struct TA needs to be shared .
My question is, the struct TA is not used in offload code block, why must set it to share.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rajiv .
Thank your response.
I think TA is not used in offload code block, why must set it to share?
The ICC need fix it, I think. ^_^
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page