Repository: incubator-systemml
Updated Branches:
  refs/heads/master ff170f73e -> 77b8e0888


[SYSTEMML-382] Performance sparse-sparse transpose (row preallocation)

Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/785d151c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/785d151c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/785d151c

Branch: refs/heads/master
Commit: 785d151c76fd8431be1cdd912dd60a45c4865769
Parents: ff170f7
Author: Matthias Boehm <[email protected]>
Authored: Fri Apr 29 17:56:48 2016 -0700
Committer: Matthias Boehm <[email protected]>
Committed: Sat Apr 30 14:00:50 2016 -0700

----------------------------------------------------------------------
 .../apache/sysml/runtime/matrix/data/LibMatrixReorg.java | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/785d151c/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java 
b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
index b288ba0..710c5bc 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
@@ -849,12 +849,11 @@ public class LibMatrixReorg
                }
                
                //allocate output sparse rows
-               //TODO perf sparse block
-               //if( cnt != null ) {
-               //      for( int i=0; i<m2; i++ )
-               //              if( cnt[i] > 0 )
-               //                      c[i] = new SparseRow(cnt[i]);
-               //}
+               if( cnt != null ) {
+                       for( int i=0; i<m2; i++ )
+                               if( cnt[i] > 0 )
+                                       c.allocate(i, cnt[i]);
+               }
                
                //blocking according to typical L2 cache sizes 
                final int blocksizeI = 128;

Reply via email to