- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
struct obj {
int* arr;
int size;
};
struct obj {
vector<int> arr;
int size;
};
I want to build a struct like above, but sycl may not allow these struct. The first struct contains a point, So these data to which the pointer points cannot be copied to device. The second struct contains a vector, but at code of device I am not able to get data using subscripts.
The quesition is how can I build a struct with same functional which can be used on the device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Were the sample codes that we provided able to resolve your issue?
If you still face any issues, you can reach out to us.
Thanks & Regards,
Shaik Rabiya
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
>>>The quesition is how can I build a struct with same functional which can be used on the device.
We can build structures with both array pointer member and vector member in SYCL code which can be used on device.
We've tried a sample code using structures with both array pointer and vector members and we received expected outputs.
Please refer to the attached zip file for the sample codes that we have tried.
Also please refer to the below screenshots for the results.
For structure with pointer array member:
For structure with vector member:
Thanks & Regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Were the sample codes that we provided able to resolve your issue?
If you still face any issues, you can reach out to us.
Thanks & Regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please let us know whether your issue is resolved as you accepted it as a solution?
If your issue isn't resolved, please reach out to us.
Thanks & Regards,
Shaik Rabiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I hope your issue is resolved. If you need any additional information, you can raise a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Shaik Rabiya
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page