com.ibm.layout

Class LongArray1D



  • public abstract class LongArray1D
    extends LayoutType
    1D array of primitive long.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected long length 
    • Constructor Summary

      Constructors 
      Modifier Constructor and Description
      protected LongArray1D(long length) 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract long at(long index)
      Get an array element
      long getLength()
      Get the number of array elements.
      abstract void put(long index, long value)
      Set an array element
      abstract LongArray1D range(long startIdx, long length)
      Extract a sub range of the array
      long sizeof()
      Get the data size required for an array of a given length.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • length

        protected final long length
    • Constructor Detail

      • LongArray1D

        protected LongArray1D(long length)
    • Method Detail

      • at

        public abstract long at(long index)
        Get an array element
        Parameters:
        index - the element index
        Returns:
        a layout targeting the array element
      • getLength

        public final long getLength()
        Get the number of array elements.
        Returns:
        the number of array elements
      • put

        public abstract void put(long index,
                                 long value)
        Set an array element
        Parameters:
        index - the element index
        value - new value of the array element
      • range

        public abstract LongArray1D range(long startIdx,
                                          long length)
        Extract a sub range of the array
        Parameters:
        startIdx - the starting array index
        length - the number of array elements to extract
        Returns:
        a layout targeting a sub range of the array
      • sizeof

        public long sizeof()
        Get the data size required for an array of a given length.
        Specified by:
        sizeof in class LayoutType
        Parameters:
        length - The number of elements.
        Returns:
        the data size in bytes
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
Technology preview - internal use for evaluation purposes only
© Copyright 2014, 2015 IBM Corporation.