Ejemplo n.º 1
0
 @Override
 protected void ssymm(
     char Order,
     char Side,
     char Uplo,
     int M,
     int N,
     float alpha,
     INDArray A,
     int lda,
     INDArray B,
     int ldb,
     float beta,
     INDArray C,
     int ldc) {
   float[] cData = getFloatData(C);
   BLAS.getInstance()
       .ssymm(
           String.valueOf(Side),
           String.valueOf(Uplo),
           M,
           N,
           alpha,
           getFloatData(A),
           getBlasOffset(A),
           lda,
           getFloatData(B),
           getBlasOffset(B),
           ldb,
           beta,
           cData,
           getBlasOffset(C),
           ldc);
   setData(cData, C);
 }
Ejemplo n.º 2
0
 @Override
 protected void ssyrk(
     char Order,
     char Uplo,
     char Trans,
     int N,
     int K,
     float alpha,
     INDArray A,
     int lda,
     float beta,
     INDArray C,
     int ldc) {
   float[] cData = getFloatData(C);
   BLAS.getInstance()
       .ssyrk(
           String.valueOf(Uplo),
           String.valueOf(Trans),
           N,
           K,
           alpha,
           getFloatData(A),
           getBlasOffset(A),
           lda,
           beta,
           cData,
           getBlasOffset(C),
           ldc);
   setData(cData, C);
 }
Ejemplo n.º 3
0
 @Override
 protected void dtrsm(
     char Order,
     char Side,
     char Uplo,
     char TransA,
     char Diag,
     int M,
     int N,
     double alpha,
     INDArray A,
     int lda,
     INDArray B,
     int ldb) {
   double[] bData = getDoubleData(B);
   BLAS.getInstance()
       .dtrsm(
           String.valueOf(Side),
           String.valueOf(Uplo),
           String.valueOf(TransA),
           String.valueOf(Diag),
           M,
           N,
           alpha,
           getDoubleData(A),
           getBlasOffset(A),
           lda,
           bData,
           getBlasOffset(B),
           ldb);
   setData(bData, B);
 }
Ejemplo n.º 4
0
 @Override
 protected void dsyrk(
     char Order,
     char Uplo,
     char Trans,
     int N,
     int K,
     double alpha,
     INDArray A,
     int lda,
     double beta,
     INDArray C,
     int ldc) {
   double[] cData = getDoubleData(C);
   BLAS.getInstance()
       .dsyrk(
           String.valueOf(Uplo),
           String.valueOf(Trans),
           N,
           K,
           alpha,
           getDoubleData(A),
           getBlasOffset(A),
           lda,
           beta,
           cData,
           getBlasOffset(C),
           ldc);
   setData(cData, C);
 }
Ejemplo n.º 5
0
 @Override
 protected void strmm(
     char Order,
     char Side,
     char Uplo,
     char TransA,
     char Diag,
     int M,
     int N,
     float alpha,
     INDArray A,
     int lda,
     INDArray B,
     int ldb) {
   float[] bData = getFloatData(B);
   BLAS.getInstance()
       .strmm(
           String.valueOf(Side),
           String.valueOf(Uplo),
           String.valueOf(TransA),
           String.valueOf(Diag),
           M,
           N,
           alpha,
           getFloatData(A),
           getBlasOffset(A),
           lda,
           getFloatData(B),
           getBlasOffset(B),
           ldb);
   setData(bData, B);
 }
Ejemplo n.º 6
0
  @Override
  protected void sgemm(
      char Order,
      char TransA,
      char TransB,
      int M,
      int N,
      int K,
      float alpha,
      INDArray A,
      int lda,
      INDArray B,
      int ldb,
      float beta,
      INDArray C,
      int ldc) {
    A = Shape.toOffsetZero(A);
    B = Shape.toOffsetZero(B);

    DataBuffer aData = A.data();
    DataBuffer bData = B.data();

    float[] cData = getFloatData(C);
    BLAS.getInstance()
        .sgemm(
            String.valueOf(TransA),
            String.valueOf(TransB),
            M,
            N,
            K,
            alpha,
            aData.asFloat(),
            getBlasOffset(A),
            lda,
            bData.asFloat(),
            getBlasOffset(B),
            ldb,
            beta,
            cData,
            getBlasOffset(C),
            ldc);
    setData(cData, C);
  }
Ejemplo n.º 7
0
  @Override
  protected void dgemm(
      char Order,
      char TransA,
      char TransB,
      int M,
      int N,
      int K,
      double alpha,
      INDArray A,
      int lda,
      INDArray B,
      int ldb,
      double beta,
      INDArray C,
      int ldc) {
    A = Shape.toOffsetZero(A);
    B = Shape.toOffsetZero(B);

    double[] cData = getDoubleData(C);
    BLAS.getInstance()
        .dgemm(
            String.valueOf(TransA),
            String.valueOf(TransB),
            M,
            N,
            K,
            alpha,
            getDoubleData(A),
            getBlasOffset(A),
            lda,
            getDoubleData(B),
            getBlasOffset(B),
            ldb,
            beta,
            cData,
            getBlasOffset(C),
            ldc);
    setData(cData, C);
  }