Skip to content

Commit

Permalink
fix blockGemm in FMat
Browse files Browse the repository at this point in the history
  • Loading branch information
John Canny committed Dec 16, 2017
1 parent 1710620 commit d2d6b79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jni/src/Operators.cu
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ int reducebin2op(int nrows, int ncols, ATYPE *A, ATYPE *B, ATYPE *C, int opb, in
GENREDUCEBIN2OP(float,optype,operators)
GENREDUCEBIN2OP(double,doptype,doperators)

/*
class FloatOps {
public:
__device__ static optype ops(int n) {return operators[n];}
Expand Down Expand Up @@ -920,3 +921,4 @@ int opTensor3D(int m, int n, int p, TT *A, int ia, int ja, int ka, TT *B, int ib
cudaError_t err = cudaGetLastError();
return err;
}
*/
2 changes: 1 addition & 1 deletion src/main/scala/BIDMat/FMat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ case class FMat(dims0:Array[Int], val data:Array[Float]) extends DenseMat[Float]
def kron(a:FMat):FMat = kron(a, null);

def blockGemm(transa:Int, transb:Int, nr:Int, nc:Int, k:Int, alpha:Float, aoff:Int, lda:Int, astep:Int,
b:FMat, boff:Int, ldb:Int, bstep:Int, c:FMat, coff:Int, ldc:Int, cstep:Int, beta:Float, nreps:Int):FMat = {
b:FMat, boff:Int, ldb:Int, bstep:Int, beta:Float, c:FMat, coff:Int, ldc:Int, cstep:Int, nreps:Int):FMat = {
c.clear;
Mat.nflops += 2L * nr * nc * k * nreps;
blockSgemm(transa, transb, nr, nc, k, alpha, data, aoff, lda, astep, b.data, boff, ldb, bstep, beta, c.data, coff, ldc, cstep, nreps);
Expand Down

0 comments on commit d2d6b79

Please # to comment.