public void CanAdd() { float[] a = new float[3] { 1f, 2f, 3f }; float[] b = new float[3] { 4f, 5f, 6f }; float[] r = new float[3]; Vml.VsAdd(2, ref a[0], ref b[0], ref r[0]); Assert.Equal(5, r[0]); }
public static (matrix, matrix) Modf(MatrixExpression a) { var tru = a.Evaluate(); if (a is MatrixInput) { tru = Copy(tru); } var rem = new matrix(tru.Rows, tru.Cols); Vml.Modf(tru.Length, tru.Array, tru.Array, rem.Array); return(tru, rem); }
public static (matrix, matrix) SinCos(MatrixExpression a) { var sin = a.Evaluate(); if (a is MatrixInput) { sin = Copy(sin); } var cos = new matrix(sin.Rows, sin.Cols); Vml.SinCos(sin.Length, sin.Array, sin.Array, cos.Array); return(sin, cos); }