@Override public IComplexNDArray gemm(IComplexNumber alpha, IComplexNDArray a, IComplexNDArray b, IComplexNumber beta, IComplexNDArray c) { LinAlgExceptions.assertMatrix(a, b, c); level3().gemm(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(b), BlasBufferUtil.getCharForTranspose(c), alpha, a, b, beta, c); return c; }
@Override public INDArray ger(Number alpha, INDArray x, INDArray y, INDArray a) { level2().ger(BlasBufferUtil.getCharForTranspose(x), alpha.doubleValue(), x, y, a); return a; }
@Override public INDArray gemv(Number alpha, INDArray a, INDArray x, double beta, INDArray y) { LinAlgExceptions.assertVector(x, y); LinAlgExceptions.assertMatrix(a); level2().gemv(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(x), alpha.doubleValue(), a, x, beta, y); return y; }
@Override public INDArray gemm(float alpha, INDArray a, INDArray b, float beta, INDArray c) { LinAlgExceptions.assertMatrix(a, b, c); if (a.data().dataType() == DataBuffer.Type.DOUBLE) { return gemm((double) alpha, a, b, (double) beta, c); } level3().gemm(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(b), BlasBufferUtil.getCharForTranspose(c), alpha, a, b, beta, c); return c; }
@Override public INDArray gemm(double alpha, INDArray a, INDArray b, double beta, INDArray c) { LinAlgExceptions.assertMatrix(a, b, c); if (a.data().dataType() == DataBuffer.Type.FLOAT) { return gemm((float) alpha, a, b, (float) beta, c); } level3().gemm(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(b), BlasBufferUtil.getCharForTranspose(c), alpha, a, b, beta, c); return c; }
Nd4j.getBlasWrapper().level2().gemv(BlasBufferUtil.getCharForTranspose(temp), BlasBufferUtil.getCharForTranspose(this), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, temp); } else { Nd4j.getBlasWrapper().level3().gemm(BlasBufferUtil.getCharForTranspose(temp), BlasBufferUtil.getCharForTranspose(this), BlasBufferUtil.getCharForTranspose(other), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, temp); Nd4j.getBlasWrapper().level2().gemv(BlasBufferUtil.getCharForTranspose(resultArray), BlasBufferUtil.getCharForTranspose(this), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, resultArray); Nd4j.getBlasWrapper().level3().gemm(BlasBufferUtil.getCharForTranspose(resultArray), BlasBufferUtil.getCharForTranspose(this), BlasBufferUtil.getCharForTranspose(other), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, resultArray);
Nd4j.getBlasWrapper().level2().gemv(BlasBufferUtil.getCharForTranspose(result), BlasBufferUtil.getCharForTranspose(this), 1.0, this, other, 0.0, temp); Nd4j.getBlasWrapper().level3().gemm(BlasBufferUtil.getCharForTranspose(result), BlasBufferUtil.getCharForTranspose(this), BlasBufferUtil.getCharForTranspose(temp), 1.0, this, other, 0.0, temp); Nd4j.getBlasWrapper().level3().gemm( BlasBufferUtil.getCharForTranspose(result), BlasBufferUtil.getCharForTranspose(this), BlasBufferUtil.getCharForTranspose(temp), 1.0, this, Nd4j.getBlasWrapper().level2().gemv( ordering(), BlasBufferUtil.getCharForTranspose(other), 1.0, this, BlasBufferUtil.getCharForTranspose(other), BlasBufferUtil.getCharForTranspose(gemmResultArr), 1.0, this,
Nd4j.getBlasWrapper().level2().gemv(ordering(), BlasBufferUtil.getCharForTranspose(other), 1.0, this, other, 0.0, gemmResultArr); } else { Nd4j.getBlasWrapper().level3().gemm(ordering(), BlasBufferUtil.getCharForTranspose(other), BlasBufferUtil.getCharForTranspose(gemmResultArr), 1.0, this, other, 0.0, gemmResultArr);
@Override public IComplexNDArray gemm(IComplexNumber alpha, IComplexNDArray a, IComplexNDArray b, IComplexNumber beta, IComplexNDArray c) { LinAlgExceptions.assertMatrix(a, b, c); level3().gemm(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(b), BlasBufferUtil.getCharForTranspose(c), alpha, a, b, beta, c); return c; }
@Override public INDArray ger(Number alpha, INDArray x, INDArray y, INDArray a) { level2().ger(BlasBufferUtil.getCharForTranspose(x), alpha.doubleValue(), x, y, a); return a; }
@Override public INDArray gemv(Number alpha, INDArray a, INDArray x, double beta, INDArray y) { LinAlgExceptions.assertVector(x, y); LinAlgExceptions.assertMatrix(a); level2().gemv(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(x), alpha.doubleValue(), a, x, beta, y); return y; }
@Override public INDArray gemm(double alpha, INDArray a, INDArray b, double beta, INDArray c) { LinAlgExceptions.assertMatrix(a, b, c); if (a.data().dataType() == DataBuffer.Type.FLOAT) { return gemm((float) alpha, a, b, (float) beta, c); } level3().gemm(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(b), BlasBufferUtil.getCharForTranspose(c), alpha, a, b, beta, c); return c; }
@Override public INDArray gemm(float alpha, INDArray a, INDArray b, float beta, INDArray c) { LinAlgExceptions.assertMatrix(a, b, c); if (a.data().dataType() == DataBuffer.Type.DOUBLE) { return gemm((double) alpha, a, b, (double) beta, c); } level3().gemm(BlasBufferUtil.getCharForTranspose(a), BlasBufferUtil.getCharForTranspose(b), BlasBufferUtil.getCharForTranspose(c), alpha, a, b, beta, c); return c; }
Nd4j.getBlasWrapper().level2().gemv(BlasBufferUtil.getCharForTranspose(temp), BlasBufferUtil.getCharForTranspose(this), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, temp); } else { Nd4j.getBlasWrapper().level3().gemm(BlasBufferUtil.getCharForTranspose(temp), BlasBufferUtil.getCharForTranspose(this), BlasBufferUtil.getCharForTranspose(other), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, temp); Nd4j.getBlasWrapper().level2().gemv(BlasBufferUtil.getCharForTranspose(resultArray), BlasBufferUtil.getCharForTranspose(this), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, resultArray); Nd4j.getBlasWrapper().level3().gemm(BlasBufferUtil.getCharForTranspose(resultArray), BlasBufferUtil.getCharForTranspose(this), BlasBufferUtil.getCharForTranspose(other), Nd4j.UNIT, this, otherArray, Nd4j.ZERO, resultArray);
Nd4j.getBlasWrapper().level2().gemv(BlasBufferUtil.getCharForTranspose(result), BlasBufferUtil.getCharForTranspose(this), 1.0, this, other, 0.0, temp); Nd4j.getBlasWrapper().level3().gemm(BlasBufferUtil.getCharForTranspose(result), BlasBufferUtil.getCharForTranspose(this), BlasBufferUtil.getCharForTranspose(temp), 1.0, this, other, 0.0, temp); Nd4j.getBlasWrapper().level2().gemv( ordering(), BlasBufferUtil.getCharForTranspose(other), 1.0, this, BlasBufferUtil.getCharForTranspose(other), BlasBufferUtil.getCharForTranspose(gemmResultArr), 1.0, this,