- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Theoretically,
sum = __sec_reduce_add(a[:][:]); //sum across the whole array 'a'
sum_of_column[:]=__sec_reduce_add(a[:][:]); //sum across the column of 'a'
Actually, when I tested the second statement, the sum_of_column got always the sum across the whole array of a, no matter the rank of sum_of_column.
For a given execution context of rank m and a reduction array section argument with rank n, where n>m, it is the last n-m ranks of the array section argument who should be reduced, right? What went wrong?
Thank you for your help!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Phillippe,
What compiler (and version) are you using?
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using icc version 13.1.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To the person who is reporting and responding to this issue on behalf of Philippe, can you please send me a private message containing your personal email address. There seems to be a profile conflict problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for trying out our language feature. The reduction operations are simply defined---they always reduce everything down to a single scalar value. To do a column sum, an outer loop is needed: [cpp] for (int i = 0; i < rows; i++) { sum = __sec_reduce_add(a[:]); } [/cpp]
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page