Created
June 7, 2014 21:28
-
-
Save piotrMocz/570f9dbda166cee4f904 to your computer and use it in GitHub Desktop.
Sgetrf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// an extract from a REPL session | |
val A = CuMatrix.fromDense(DenseMatrix((1.0f, 1.0f, 2.0f, 1.0f), (1.0f, 2.0f, 1.0f, -2.0f), (3.0f, -1.0f, 3.0f, -2.0f), (-2.0f, 3.0f, -1.0f, 1.0f))) | |
val N = 4 | |
val Aarray = jcuda.Pointer.to(A.offsetPointer) // this is the one I'm most uncertain about | |
val P = CuMatrix.create[Int](N, 1) // but I'm not sure about those 2 either | |
val info = CuMatrix.create[Int](N,1) | |
JCublas2.cublasSgetrfBatched(handle, N, Aarray, N, P.offsetPointer, info.offsetPointer, 1) // this call returns success (0), | |
// but A is zeroed-out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment