# HG changeset patch # User Rik # Date 1663710236 25200 # Node ID b542b88ad3b64d81b5332eb1b4a8f6dca2ccf1f5 # Parent a1318deb45840063d4f2b48c353dbeaa99f70f8d maint: Use space between function name and '(' in sparse-xpow.cc. * sparse-xpow.cc: Use space between function name and '(' in sparse-xpow.cc. diff -r a1318deb4584 -r b542b88ad3b6 libinterp/corefcn/sparse-xpow.cc --- a/libinterp/corefcn/sparse-xpow.cc Tue Sep 20 09:00:02 2022 -0400 +++ b/libinterp/corefcn/sparse-xpow.cc Tue Sep 20 14:43:56 2022 -0700 @@ -67,7 +67,7 @@ octave_idx_type nc = a.cols (); if (nr == 0 || nc == 0) - return SparseMatrix(); + return SparseMatrix (); // If we are here, A is not empty ==> A needs to be square. if (nr != nc) @@ -112,7 +112,7 @@ else atmp = a; - if (atmp.nnz() == 0) // Fast return for all-zeros matrix + if (atmp.nnz () == 0) // Fast return for all-zeros matrix return atmp; SparseMatrix result (atmp); @@ -124,7 +124,8 @@ // of multiplications but the matrices it multiplies tend to be dense // towards the end. // Linear multiplication uses a linear number of multiplications - // but one of the matrices it uses will be as sparse as the original matrix. + // but one of the matrices it uses will be as sparse as the original + // matrix. // // The time to multiply fixed-size matrices is strongly affected by their // sparsity. Denser matrices take much longer to multiply together. @@ -133,15 +134,15 @@ // // The tradeoff is between many fast multiplications or a few slow ones. // - // Large exponents favor the squaring technique, and sparse matrices favor - // linear multiplication. + // Large exponents favor the squaring technique, and sparse matrices + // favor linear multiplication. // // We calculate a threshold based on the sparsity of the input // and use squaring for exponents larger than that. // // FIXME: Improve this threshold calculation. - uint64_t sparsity = atmp.numel() / atmp.nnz(); // reciprocal of density + uint64_t sparsity = atmp.numel () / atmp.nnz (); // reciprocal of density int threshold = (sparsity >= 1000) ? 40 : (sparsity >= 100) ? 20 : 3; @@ -180,7 +181,7 @@ octave_idx_type nc = a.cols (); if (nr == 0 || nc == 0) - return SparseMatrix(); + return SparseMatrix (); // If we are here, A is not empty ==> A needs to be square. if (nr != nc) @@ -222,7 +223,7 @@ else atmp = a; - if (atmp.nnz() == 0) // Fast return for all-zeros matrix + if (atmp.nnz () == 0) // Fast return for all-zeros matrix return atmp; SparseComplexMatrix result (atmp); @@ -235,7 +236,7 @@ // // FIXME: Improve this threshold calculation. - uint64_t sparsity = atmp.numel() / atmp.nnz(); // reciprocal of density + uint64_t sparsity = atmp.numel () / atmp.nnz (); // reciprocal of density int threshold = (sparsity >= 1000) ? 40 : (sparsity >= 100) ? 20 : 3;