Class Create

java.lang.Object
jcuda.utils.Create

public class Create extends Object
Utility class for creating arrays containing random data. By default, the methods of this class will always return the same random data for the same sequence of calls, but by invoking the randomize() method, the results may be turned to be 'really' random.
  • Method Details

    • randomize

      public static void randomize()
      Will randomize the random number generator
    • randomize

      public static void randomize(long seed)
      Will initialize the random number generator with the given seed.
      Parameters:
      seed - The random seed
    • createRandomFloatData

      public static float[] createRandomFloatData(int size)
      Creates a new array with the given size, containing random data
      Parameters:
      size - The size of the array
      Returns:
      The array
    • createRandomDoubleData

      public static double[] createRandomDoubleData(int size)
      Creates a new array with the given size, containing random data
      Parameters:
      size - The size of the array
      Returns:
      The array
    • createRandomIntData

      public static int[] createRandomIntData(int size)
      Creates a new array with the given size, containing random data
      Parameters:
      size - The size of the array
      Returns:
      The array