Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*

DCP++ subgroup

RitaChu
Employee
789 Views

Hi, 

What is the difference between subgroup shuffle and group_broadcast.  To me they seem to generate same results if you give the same index to shuffle/broadcast.

Thanks

0 Kudos
5 Replies
SantoshY_Intel
Moderator
758 Views

Hi,


Thanks for reaching out to us.


The sub-group broadcast function can be thought of as a specialized version of the general-purpose shuffle function, where the shuffle index is the same for all work-items in the sub-group.


>>"To me they seem to generate same results if you give the same index to shuffle/broadcast."

When the shuffle index is known to be the same for all work-items in the sub-group, then we will get the same results for both shuffle and broadcast.

But, using broadcast instead of shuffle provides the compiler additional information and may increase performance on some implementations. 


Thanks & Regards,

Santosh


0 Kudos
RitaChu
Employee
740 Views
0 Kudos
SantoshY_Intel
Moderator
717 Views

Hi,

 

Could you please let us know whether you have any other issues? If not, could you please confirm whether we can close this thread from our end?

 

Thanks & Regards,

Santosh

 

0 Kudos
RitaChu
Employee
709 Views

@SantoshY_Intel I have no more issue, please close the thread.  Thank you very much

0 Kudos
SantoshY_Intel
Moderator
696 Views

Hi,


As your issue is resolved, we are closing this thread. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Santosh


0 Kudos
Reply