void ICpuTensorMath.Gemv(BlasTranspose transA, int m, int n, double alpha, ArraySlice <double> a, ArraySlice <double> x, double beta, ArraySlice <double> y) { Contract.Requires(a != null); Contract.Requires(x != null); Contract.Requires(y != null); Contract.Requires(m > 0 && n > 0); Contract.Requires(a.Length == m * n); Contract.Requires(!double.IsNaN(alpha) && !double.IsNaN(beta)); Contract.Requires(Contract.ForAll(a, aa => !double.IsNaN(aa))); Contract.Requires(Contract.ForAll(x, xx => !double.IsNaN(xx))); Contract.Requires(Contract.ForAll(y, yy => !double.IsNaN(yy))); Contract.Ensures(Contract.ForAll(y, yy => !double.IsNaN(yy))); }
void ICpuTensorMath.Gemm(BlasTranspose transA, BlasTranspose transB, int m, int n, int k, double alpha, ArraySlice <double> a, ArraySlice <double> b, double beta, ArraySlice <double> c) { Contract.Requires(m > 0 && n > 0 && k > 0); Contract.Requires(a != null); Contract.Requires(b != null); Contract.Requires(c != null); Contract.Requires(a.Length == m * k); Contract.Requires(b.Length == k * n); Contract.Requires(c.Length == m * n); Contract.Requires(!double.IsNaN(alpha) && !double.IsNaN(beta)); Contract.Requires(Contract.ForAll(a, aa => !double.IsNaN(aa))); Contract.Requires(Contract.ForAll(b, bb => !double.IsNaN(bb))); Contract.Requires(Contract.ForAll(c, cc => !double.IsNaN(cc))); Contract.Ensures(Contract.ForAll(c, cc => !double.IsNaN(cc))); }
public static extern void tpsv(BlasLayout Layout, BlasUpLo UpLo, BlasTranspose Trans, BlasDiag Diag, int n, double[] ap, double[] x, int incX);
public void Gemv(BlasTranspose transA, int m, int n, double alpha, ArraySlice <double> a, ArraySlice <double> x, double beta, ArraySlice <double> y) { VclNativeMethods.vclGemv(transA, m, n, alpha, a.Array, a.Offset, a.Length, x.Array, x.Offset, x.Length, beta, y.Array, y.Offset, y.Length); }
public void Gemm(BlasTranspose transA, BlasTranspose transB, int m, int n, int k, double alpha, ArraySlice <double> a, ArraySlice <double> b, double beta, ArraySlice <double> c) { VclNativeMethods.vclGemm(transA, transB, m, n, k, alpha, a.Array, a.Offset, b.Array, b.Offset, beta, c.Array, c.Offset); }
internal static extern void vclGemv(BlasTranspose transA, int m, int n, double alpha, [In] double[] a, int aOffset, int aLength, [In] double[] x, int xOffset, int xLength, double beta, [In, Out] double[] y, int yOffset, int yLength);
void ICpuTensorMath.Gemm(BlasTranspose transA, BlasTranspose transB, int m, int n, int k, double alpha, ArraySlice<double> a, ArraySlice<double> b, double beta, ArraySlice<double> c) { Contract.Requires(m > 0 && n > 0 && k > 0); Contract.Requires(a != null); Contract.Requires(b != null); Contract.Requires(c != null); Contract.Requires(a.Length == m * k); Contract.Requires(b.Length == k * n); Contract.Requires(c.Length == m * n); Contract.Requires(!double.IsNaN(alpha) && !double.IsNaN(beta)); Contract.Requires(Contract.ForAll(a, aa => !double.IsNaN(aa))); Contract.Requires(Contract.ForAll(b, bb => !double.IsNaN(bb))); Contract.Requires(Contract.ForAll(c, cc => !double.IsNaN(cc))); Contract.Ensures(Contract.ForAll(c, cc => !double.IsNaN(cc))); }
internal static extern void vclGemm(BlasTranspose transA, BlasTranspose transB, int m, int n, int k, double alpha, [In] double[] a, int aOffset, [In] double[] b, int bOffset, double beta, [In,Out] double[] c, int cOffset);
public static extern void gbmv(BlasLayout Layout, BlasTranspose Trans, int m, int n, int kl, int ku, float alpha, float[] a, int lda, float[] x, int incX, float beta, float[] y, int incY);
public static extern void syrk2(BlasLayout Layout, BlasUpLo UpLo, BlasTranspose Trans, int n, int k, float alpha, float[] a, int lda, float[] b, int ldb, float beta, float[] c, int ldc);
public static extern void gemm(BlasLayout Layout, BlasTranspose TransA, BlasTranspose TransB, int m, int n, int k, double alpha, double[] a, int lda, double[] b, int ldb, double beta, double[] c, int ldc);
public void Gemm(BlasTranspose transA, BlasTranspose transB, int m, int n, int k, double alpha, ArraySlice<double> a, ArraySlice<double> b, double beta, ArraySlice<double> c) { VclNativeMethods.vclGemm(transA, transB, m, n, k, alpha, a.Array, a.Offset, b.Array, b.Offset, beta, c.Array, c.Offset); }
public void Gemv(BlasTranspose transA, int m, int n, double alpha, ArraySlice<double> a, ArraySlice<double> x, double beta, ArraySlice<double> y) { VclNativeMethods.vclGemv(transA, m, n, alpha, a.Array, a.Offset, a.Length, x.Array, x.Offset, x.Length, beta, y.Array, y.Offset, y.Length); }
public static extern void trsv(BlasLayout Layout, BlasUpLo UpLo, BlasTranspose Trans, BlasDiag Diag, int n, float[] a, int lda, float[] x, int incX);
public static extern void syrk2(BlasLayout Layout, BlasUpLo UpLo, BlasTranspose Trans, int n, int k, double alpha, double[] a, int lda, double[] b, int ldb, double beta, double[] c, int ldc);
public static extern void gemv(BlasLayout Layout, BlasTranspose Trans, int m, int n, double alpha, double[] a, int lda, double[] x, int incX, double beta, double[] y, int incY);
public static extern void trmm(BlasLayout Layout, BlasSide Side, BlasUpLo UpLo, BlasTranspose Trans, BlasDiag Diag, int m, int n, float alpha, float[] a, int lda, float[] b, int ldb);
public static extern void tbmv(BlasLayout Layout, BlasUpLo UpLo, BlasTranspose Trans, BlasDiag Diag, int n, int k, double[] a, int lda, double[] x, int incX);
public static extern void trsm(BlasLayout Layout, BlasSide Side, BlasUpLo UpLo, BlasTranspose Trans, BlasDiag Diag, int m, int n, double alpha, double[] a, int lda, double[] b, int ldb);
internal static extern void vclGemv(BlasTranspose transA, int m, int n, double alpha, [In] double[] a, int aOffset, int aLength, [In] double[] x, int xOffset, int xLength, double beta, [In,Out] double[] y, int yOffset, int yLength);
public static extern void gemm(BlasLayout Layout, BlasTranspose TransA, BlasTranspose TransB, int m, int n, int k, float alpha, float[] a, int lda, float[] b, int ldb, float beta, float[] c, int ldc);
void ICpuTensorMath.Gemv(BlasTranspose transA, int m, int n, double alpha, ArraySlice<double> a, ArraySlice<double> x, double beta, ArraySlice<double> y) { Contract.Requires(a != null); Contract.Requires(x != null); Contract.Requires(y != null); Contract.Requires(m > 0 && n > 0); Contract.Requires(a.Length == m * n); Contract.Requires(!double.IsNaN(alpha) && !double.IsNaN(beta)); Contract.Requires(Contract.ForAll(a, aa => !double.IsNaN(aa))); Contract.Requires(Contract.ForAll(x, xx => !double.IsNaN(xx))); Contract.Requires(Contract.ForAll(y, yy => !double.IsNaN(yy))); Contract.Ensures(Contract.ForAll(y, yy => !double.IsNaN(yy))); }
internal static extern void vclGemm(BlasTranspose transA, BlasTranspose transB, int m, int n, int k, double alpha, [In] double[] a, int aOffset, [In] double[] b, int bOffset, double beta, [In, Out] double[] c, int cOffset);