Module tornado.api

Class DoubleArray

java.lang.Object
uk.ac.manchester.tornado.api.types.arrays.TornadoNativeArray
uk.ac.manchester.tornado.api.types.arrays.DoubleArray

public final class DoubleArray extends TornadoNativeArray
DoubleArray relies on preview features of the Java platform:
Programs can only use DoubleArray when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
This class represents an array of doubles stored in native memory. The double data is stored in a MemorySegmentPREVIEW, which represents a contiguous region of off-heap memory. The class also encapsulates methods for setting and getting double values, for initializing the double array, and for converting the array to and from different representations.
  • Constructor Details

    • DoubleArray

      public DoubleArray(int numberOfElements)
      Constructs a new instance of the DoubleArray that will store a user-specified number of elements.
      Parameters:
      numberOfElements - The number of elements in the array.
    • DoubleArray

      public DoubleArray(DoubleArray... arrays)
      Constructs a new DoubleArray instance by concatenating the contents of the given array of DoubleArray instances.
      Parameters:
      arrays - An array of DoubleArray instances to be concatenated into the new instance.
  • Method Details