XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • P4
    • None
    • 9
    • core-libs
    • None

    Description

      Support VarHandles for variables that elements of an array view over a source array of a different primitive component types.

      View an array of byte, short, char as array of int or long for all fenced/atomic ops, as permitted by the required sub-range and array length.

      The opposite, viewing an array of long as an array of byte should be considered, but is likely of less importance from the perspective of performed (vectorized operations) and fenced/atomic operations.

      For unaligned architectures fenced and atomic operations can be supported at aligned and unaligned offsets into the source array.
         
      For aligned architectures fenced and atomic operations can be supported *only* for aligned offsets into the source array.

      Support for big, little and natural (Java) endian should be considered.

      Bounds checks are performed before access.

      The implementation of VarHandles for array views is likely to be similar to that of VarHandles for ByteBuffers.

      There are similarities here with ByteBuffer.getInt/getLong methods, except in these cases an array of byte requires wrapping in a ByteBuffer, which for performance sensitive scenarios may be a problem, and there is no support for fenced/atomic operations.

      Attachments

        Activity

          People

            psandoz Paul Sandoz
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: