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)));
        }
Example #3
0
 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);
Example #9
0
 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);
Example #10
0
 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);
Example #11
0
 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);
 }
Example #14
0
 public static extern void trsv(BlasLayout Layout, BlasUpLo UpLo, BlasTranspose Trans, BlasDiag Diag, int n,
                                float[] a, int lda, float[] x, int incX);
Example #15
0
 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);
Example #16
0
 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);
Example #17
0
 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);
Example #18
0
 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);
Example #19
0
 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);
Example #21
0
 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);
Example #22
0
        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);