-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add numberOfElements parameter to getArrayletLayout() #18268
Conversation
0-length arrays have Discontiguous layout. Currently detection of 0-length arrays based on dataSizeInBytes. There is not good enough for 0-stride arrays obviously (have dataSizeInBytes equal 0). All 0-stride arrays should be treated as Contiguous with exception of 0-length 0-stride should be Discontiguous. Passing of numberOfElements helps to solve this problem, dataSizeInBytes is not required to be passed any more. Signed-off-by: Dmitri Pivkine <[email protected]>
In #17994 fix for #17994 we have assumed 0-length 0-stride array can be treated as Contiguous (as any other 0-stride array). This appeared to be incorrect in the current code. 0-length 0-stride array has to be treated as Discontiguous exceptionally (as any other 0-length array). |
jenkins sanity aix,win jdk17 |
@hangshao0 @hzongaro @a7ehuo FYI |
jenkins test sanity aix,win jdk17 |
Failure in Windows build relates to infrastructure. Re-launching. |
jenkins test sanity win jdk17 |
I don't see other errors in the Windows build except
Looks like it is reason for failure for me. |
@dmitripivkine @amicic, would this change have caused this error in the Windows PR builds:
|
it indeed is (ArrayletObjectModel.hpp(1152)). I'll revert it - it's not an urgent change, anyway |
0-length arrays have Discontiguous layout.
Currently detection of 0-length arrays based on dataSizeInBytes. There is not good enough for 0-stride arrays obviously (have dataSizeInBytes equal 0). All 0-stride arrays should be treated as Contiguous with exception of 0-length 0-stride should be Discontiguous. Passing of numberOfElements helps to solve this problem, dataSizeInBytes is not required to be passed any more.