Class Kernels

java.lang.Object
civitas.celestis.gpu.Kernels

public final class Kernels extends Object
Contains predefined kernels.
  • Field Details

    • ADD_DOUBLES

      public static final KernelSource ADD_DOUBLES
      A program which takes two doubles and outputs the sum. (a + b)
      • Parameter count: 3
      • Parameter 0: double[] of length 1 (input A)
      • Parameter 1: double[] of length 1 (input B)
      • Parameter 2: double[] of length 1 (output)
      • Work size: 1
    • SUBTRACT_DOUBLES

      public static final KernelSource SUBTRACT_DOUBLES
      A program which takes two doubles and outputs the difference. (a - b)
      • Parameter count: 3
      • Parameter 0: double[] of length 1 (input A)
      • Parameter 1: double[] of length 1 (input B)
      • Parameter 2: double[] of length 1 (output)
      • Work size: 1
    • MULTIPLY_DOUBLES

      public static final KernelSource MULTIPLY_DOUBLES
      A program which takes two doubles and outputs the product. (a * b)
      • Parameter count: 3
      • Parameter 0: double[] of length 1 (input A)
      • Parameter 1: double[] of length 1 (input B)
      • Parameter 2: double[] of length 1 (output)
      • Work size: 1
    • DIVIDE_DOUBLES

      public static final KernelSource DIVIDE_DOUBLES
      A program which takes two doubles and outputs the quotient. (a / b)
      • Parameter count: 3
      • Parameter 0: double[] of length 1 (input A)
      • Parameter 1: double[] of length 1 (input B)
      • Parameter 2: double[] of length 1 (output)
      • Work size: 1
    • SQRT_DOUBLE

      public static final KernelSource SQRT_DOUBLE
      A program which takes one double and outputs the square root. (sqrt(a))
      • Parameter count: 2
      • Parameter 0: double[] of length 1 (input A)
      • Parameter 1: double[] of length 1 (output)
      • Work size: 1
    • NORMALIZE_VECTOR_2

      public static final KernelSource NORMALIZE_VECTOR_2
      A program which takes one double[] and outputs the normalized array.
      • Parameter count: 2
      • Parameter 0: double[] of length 2 (input A)
      • Parameter 1: double[] of length 2 (output)
      • Work size: 2
    • NORMALIZE_VECTOR_3

      public static final KernelSource NORMALIZE_VECTOR_3
      A program which takes one double[] and outputs the normalized array.
      • Parameter count: 2
      • Parameter 0: double[] of length 3 (input A)
      • Parameter 1: double[] of length 3 (output)
      • Work size: 3
    • NORMALIZE_VECTOR_4

      public static final KernelSource NORMALIZE_VECTOR_4
      A program which takes one double[] and outputs the normalized array.
      • Parameter count: 2
      • Parameter 0: double[] of length 4 (input A)
      • Parameter 1: double[] of length 4 (output)
      • Work size: 4
    • DEBUG_1

      public static final KernelSource DEBUG_1
      Kernel used for debugging.
  • Constructor Details

    • Kernels

      public Kernels()