Module tornado.api

Class TornadoMath

java.lang.Object
uk.ac.manchester.tornado.api.math.TornadoMath

public class TornadoMath extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte
    abs(byte a)
     
    static double
    abs(double a)
     
    static float
    abs(float a)
     
    static int
    abs(int a)
     
    static long
    abs(long a)
     
    static short
    abs(short a)
     
    static double
    acos(double a)
     
    static float
    acos(float a)
     
    static double
    acosh(double x)
     
    static float
    acosh(float x)
     
    static double
    asin(double a)
     
    static float
    asin(float a)
     
    static double
    asinh(double x)
     
    static float
    asinh(float x)
     
    static double
    atan(double value)
     
    static float
    atan(float value)
     
    static double
    atan2(double a, double b)
     
    static float
    atan2(float a, float b)
     
    static String
    bitDiff(float[] a, float[] b)
     
    static double
    ceil(double value)
     
    static float
    ceil(float value)
     
    static byte
    clamp(byte val, byte min, byte max)
     
    static double
    clamp(double val, double min, double max)
     
    static float
    clamp(float val, float min, float max)
     
    static int
    clamp(int val, int min, int max)
     
    static long
    clamp(long val, long min, long max)
     
    static short
    clamp(short val, short min, short max)
     
    static double
    cos(double angle)
    In PTX, the cos operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    static float
    cos(float angle)
     
    static Float16
     
    static Float2
     
    static Float4
     
    static Float8
     
    static double
    cospi(double angle)
    In PTX, the cospi operation that accepts a double input is narrowed to f32, since the PTX cos instruction does not support f64 operands.
    static float
    cospi(float angle)
     
    static double
    exp(double value)
    In PTX, the exp operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    static float
    exp(float value)
     
    static double
    findULPDistance(double[] value, double[] expected)
     
    static float
    findULPDistance(float[] value, float[] expected)
     
    static double
     
    static float
     
    static float
     
    static double
    floor(double f)
     
    static float
    floor(float f)
     
    static double
    fract(double f)
     
    static float
    fract(float f)
     
    static boolean
    isEqual(byte[] a, byte[] b)
     
    static boolean
    isEqual(double[] a, double[] b)
     
    static boolean
    isEqual(float[] a, float[] b)
     
    static boolean
    isEqual(int[] a, int[] b)
     
    static boolean
    isEqual(short[] a, short[] b)
     
    static boolean
     
    static boolean
     
    static boolean
     
    static boolean
     
    static boolean
    isEqualTol(float[] a, float[] b, float tol)
     
    static boolean
    isEqualULP(double[] value, double[] expected, double numULP)
     
    static boolean
    isEqualULP(float[] value, float[] expected, float numULP)
     
    static double
    log(double value)
    In PTX, the log operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    static float
    log(float value)
     
    static double
    log2(double value)
    In PTX, the log2 operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    static float
    log2(float value)
     
    static byte
    max(byte a, byte b)
     
    static double
    max(double a, double b)
     
    static float
    max(float a, float b)
     
    static int
    max(int a, int b)
     
    static long
    max(long a, long b)
     
    static short
    max(short a, short b)
     
    static HalfFloat
     
    static byte
    min(byte a, byte b)
     
    static double
    min(double a, double b)
     
    static float
    min(float a, float b)
     
    static int
    min(int a, int b)
     
    static long
    min(long a, long b)
     
    static short
    min(short a, short b)
     
    static HalfFloat
     
    static double
    PI()
     
    static double
    pow(double a, double b)
     
    static float
    pow(float a, float b)
     
    static Float3
     
    static double
    signum(double a)
     
    static float
    signum(float a)
     
    static double
    sin(double angle)
    In PTX, the sin operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    static float
    sin(float angle)
     
    static Float16
     
    static Float2
     
    static Float4
     
    static Float8
     
    static double
    sinpi(double angle)
    In PTX, the sinpi operation that accepts a double input is narrowed to f32, since the PTX sin instruction does not support f64 operands.
    static float
    sinpi(float angle)
     
    static double
    sqrt(double value)
     
    static float
    sqrt(float value)
     
    static double
    tan(double value)
     
    static float
    tan(float value)
     
    static double
    tanh(double value)
     
    static float
    tanh(float value)
     
    static double
    toRadians(double angdeg)
     
    static float
    toRadians(float angdeg)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TornadoMath

      public TornadoMath()
  • Method Details

    • min

      public static float min(float a, float b)
    • min

      public static double min(double a, double b)
    • min

      public static long min(long a, long b)
    • min

      public static int min(int a, int b)
    • min

      public static short min(short a, short b)
    • min

      public static byte min(byte a, byte b)
    • min

      public static HalfFloat min(HalfFloat a, HalfFloat b)
    • max

      public static double max(double a, double b)
    • max

      public static float max(float a, float b)
    • max

      public static long max(long a, long b)
    • max

      public static int max(int a, int b)
    • max

      public static short max(short a, short b)
    • max

      public static byte max(byte a, byte b)
    • max

      public static HalfFloat max(HalfFloat a, HalfFloat b)
    • abs

      public static float abs(float a)
    • abs

      public static double abs(double a)
    • abs

      public static long abs(long a)
    • abs

      public static int abs(int a)
    • abs

      public static short abs(short a)
    • abs

      public static byte abs(byte a)
    • exp

      public static float exp(float value)
    • exp

      public static double exp(double value)
      In PTX, the exp operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    • sqrt

      public static float sqrt(float value)
    • sqrt

      public static double sqrt(double value)
    • clamp

      public static long clamp(long val, long min, long max)
    • clamp

      public static int clamp(int val, int min, int max)
    • clamp

      public static short clamp(short val, short min, short max)
    • clamp

      public static byte clamp(byte val, byte min, byte max)
    • clamp

      public static float clamp(float val, float min, float max)
    • clamp

      public static double clamp(double val, double min, double max)
    • floor

      public static float floor(float f)
    • floor

      public static double floor(double f)
    • fract

      public static float fract(float f)
    • fract

      public static double fract(double f)
    • cos

      public static Float2 cos(Float2 f)
    • cos

      public static Float4 cos(Float4 f)
    • cos

      public static Float8 cos(Float8 f)
    • cos

      public static Float16 cos(Float16 f)
    • sin

      public static Float2 sin(Float2 f)
    • sin

      public static Float4 sin(Float4 f)
    • sin

      public static Float8 sin(Float8 f)
    • sin

      public static Float16 sin(Float16 f)
    • isEqual

      public static boolean isEqual(float[] a, float[] b)
    • isEqual

      public static boolean isEqual(FloatArray a, FloatArray b)
    • isEqual

      public static boolean isEqual(IntArray a, IntArray b)
    • isEqual

      public static boolean isEqual(HalfFloatArray a, HalfFloatArray b)
    • isEqual

      public static boolean isEqual(DoubleArray a, DoubleArray b)
    • isEqual

      public static boolean isEqual(double[] a, double[] b)
    • isEqualULP

      public static boolean isEqualULP(float[] value, float[] expected, float numULP)
    • isEqualULP

      public static boolean isEqualULP(double[] value, double[] expected, double numULP)
    • findULPDistance

      public static float findULPDistance(FloatArray value, FloatArray expected)
    • findULPDistance

      public static double findULPDistance(DoubleArray value, DoubleArray expected)
    • findULPDistance

      public static float findULPDistance(float[] value, float[] expected)
    • findULPDistance

      public static double findULPDistance(double[] value, double[] expected)
    • isEqualTol

      public static boolean isEqualTol(float[] a, float[] b, float tol)
    • isEqual

      public static boolean isEqual(int[] a, int[] b)
    • isEqual

      public static boolean isEqual(short[] a, short[] b)
    • isEqual

      public static boolean isEqual(byte[] a, byte[] b)
    • bitDiff

      public static String bitDiff(float[] a, float[] b)
    • log

      public static float log(float value)
    • log

      public static double log(double value)
      In PTX, the log operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    • log2

      public static float log2(float value)
    • log2

      public static double log2(double value)
      In PTX, the log2 operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    • atan

      public static float atan(float value)
    • atan

      public static double atan(double value)
    • tan

      public static float tan(float value)
    • tan

      public static double tan(double value)
    • tanh

      public static float tanh(float value)
    • tanh

      public static double tanh(double value)
    • floatPI

      public static float floatPI()
    • PI

      public static double PI()
    • pow

      public static float pow(float a, float b)
    • pow

      public static double pow(double a, double b)
    • atan2

      public static float atan2(float a, float b)
    • atan2

      public static double atan2(double a, double b)
    • acos

      public static float acos(float a)
    • acosh

      public static float acosh(float x)
    • acosh

      public static double acosh(double x)
    • acos

      public static double acos(double a)
    • asin

      public static float asin(float a)
    • asin

      public static double asin(double a)
    • asinh

      public static float asinh(float x)
    • asinh

      public static double asinh(double x)
    • cos

      public static float cos(float angle)
    • cos

      public static double cos(double angle)
      In PTX, the cos operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    • sin

      public static float sin(float angle)
    • sin

      public static double sin(double angle)
      In PTX, the sin operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.
    • signum

      public static float signum(float a)
    • signum

      public static double signum(double a)
    • toRadians

      public static float toRadians(float angdeg)
    • toRadians

      public static double toRadians(double angdeg)
    • sinpi

      public static float sinpi(float angle)
    • sinpi

      public static double sinpi(double angle)
      In PTX, the sinpi operation that accepts a double input is narrowed to f32, since the PTX sin instruction does not support f64 operands.
    • cospi

      public static float cospi(float angle)
    • cospi

      public static double cospi(double angle)
      In PTX, the cospi operation that accepts a double input is narrowed to f32, since the PTX cos instruction does not support f64 operands.
    • rotate

      public static Float3 rotate(Matrix4x4Float m, Float3 x)
    • ceil

      public static float ceil(float value)
    • ceil

      public static double ceil(double value)