This is a static copy of a profile report

Home

Function details for get_QBQThis is a static copy of a profile report

Home

get_QBQ (Calls: 1, Time: 378.418 s)
Generated 20-Jul-2018 02:24:59 using performance time.
function in file C:\Users\yz\Dropbox\Workspace\Researches\PhD Research\My Papers\2018_symmtry_reduction\18groupsymmetrySDPSlaterHaoRenata.d\codesgroupsymmetrySDPSlaterHaoRenata.d\qap\sub-routines\get_QBQ.m
Copy to new window for comparing multiple runs

This function changed during profiling or before generation of this report. Results may be incomplete or inaccurate.

Parents (calling functions)

Function NameFunction TypeCalls
LiveEditorEvaluationHelperESectionEvalscript1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
15
for i = 1:nr_B
3757378.396 s100.0%
21
%     end
37570.008 s0.0%
12
10.002 s0.0%
13
% block-diagonalize each eleme...
10.002 s0.0%
23
end
10.000 s0.0%
All other lines  0.010 s0.0%
Totals  378.418 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
get_blkdiagfunction3757360.249 s95.2%
Self time (built-ins, overhead, etc.)  18.169 s4.8%
Totals  378.418 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function25
Non-code lines (comments, blank lines)16
Code lines (lines that can run)9
Code lines that did run6
Code lines that did not run6
Coverage (did run/can run)66.67 %
Function listing
time 
Calls 
 line
   1 
function Bhat = get_QBQ(B,Q,blk_nz,tol)
   2 

   3 

   4 
% Furthermore, if each element in B = {B_1,..,B_d} is a linear combination
   5 
% of the basis b, then Bhat_1 = Q'*B_1*Q is the associated block-diagonal
   6 
% matrix, and Bhat = {Bhat_1,...,Bhat_d}.
   7 

   8 
tic;
< 0.001 
      1 
   9
fprintf('get_QBQ ') 
  10 

  11 
nr_B = length(B);
  0.002 
      1 
  12
 
  0.002 
      1 
  13
% block-diagonalize each element in B = {B1,...,Bd} 
  14 
Bhat = cell(nr_B,1);
 378.396 
   3757 
  15
for i = 1:nr_B 
  16 
    % block diagonalize the basis matrices B
  17 
    Bhat{i} = sparse(get_blkdiag(B{i},Q,blk_nz,tol));
  18 
%     temp = Q'*B{i}*Q;
  19 
%     if norm(B_hat{i} - temp) > 1e-3
  20 
%         error
  0.008 
   3757 
  21
%     end 
  22 
    
< 0.001 
      1 
  23
end 
  24 
fprintf('  %g \n', toc)
  25 
end