nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel3.java
@Override
    public void gemm(char Order, char TransA, char TransB, IComplexNumber alpha, IComplexNDArray A, IComplexNDArray B,
                    IComplexNumber beta, IComplexNDArray C) {
        if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL)
            OpProfiler.getInstance().processBlasCall(true, A, B, C);

        GemmParams params = new GemmParams(A, B, C);

        if (A.data().dataType() == DataBuffer.Type.DOUBLE) {
            zgemm(Order, TransA, TransB, params.getM(), params.getN(), params.getK(), alpha.asDouble(),
                            A.ordering() == NDArrayFactory.C ? B : A, params.getLda(),
                            B.ordering() == NDArrayFactory.C ? A : B, params.getLdb(), beta.asDouble(), C,
                            params.getLdc());
        } else
            cgemm(Order, TransA, TransB, params.getM(), params.getN(), params.getK(), alpha.asFloat(),
                            A.ordering() == NDArrayFactory.C ? B : A, params.getLda(),
                            B.ordering() == NDArrayFactory.C ? A : B, params.getLdb(), beta.asFloat(), C,
                            params.getLdc());

    }
@Override
    public void gemm(char Order, char TransA, char TransB, IComplexNumber alpha, IComplexNDArray A, IComplexNDArray B,
                    IComplexNumber beta, IComplexNDArray C) {
        if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL)
            OpProfiler.getInstance().processBlasCall(true, A, B, C);

        GemmParams params = new GemmParams(A, B, C);

        if (A.data().dataType() == DataBuffer.Type.DOUBLE) {
            zgemm(Order, TransA, TransB, params.getM(), params.getN(), params.getK(), alpha.asDouble(),
                            A.ordering() == NDArrayFactory.C ? B : A, params.getLda(),
                            B.ordering() == NDArrayFactory.C ? A : B, params.getLdb(), beta.asDouble(), C,
                            params.getLdc());
        } else
            cgemm(Order, TransA, TransB, params.getM(), params.getN(), params.getK(), alpha.asFloat(),
                            A.ordering() == NDArrayFactory.C ? B : A, params.getLda(),
                            B.ordering() == NDArrayFactory.C ? A : B, params.getLdb(), beta.asFloat(), C,
                            params.getLdc());

    }
gemm performs a matrix-matrix operation
c := alpha*op(a)*op(b) + beta*c,
where c is an m-by-n matrix,
op(a) is an m-by-k matrix,
op(b) is a k-by-n matrix.
@param Order
@param TransA
@param TransB
@param alpha
@param A
@param B
@param beta
@param C