-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ESIMD] Add more user-friendly error msg when write beyond simd obj (#…
…12059) It is still not prohibited to create 'simd_view' that views beyond the bounds of viewed 'simd' object. And it is not yet prohibited to read using such 'simd_view' object, but the commit 17f8939 prohibited writing beyong simd bounds. The error message was difficult to read and did not give any guidance on the proposed fix. The old error message only said that __esimd_wrregion call could not be matched. The newly added static assert says that the viewed object in LHS does not fit the value in RHS. Example of problem situation: simd<float, 16> vec; // vec is only 16-elements auto vec_too_bit_view = vec.select<128, 1>();// 128-elems - too many vec_too_bit_view = simd<float, 128>{0}; //error: write 128-elem to 16-elem storage Signed-off-by: Klochkov, Vyacheslav N <vyacheslav.n.klochkov@intel.com>
- Loading branch information
1 parent
d616546
commit 197c33a
Showing
3 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters