This is a static copy of a profile report

Home

cmxCreate_cpu (Calls: 3, Time: 0.021 sec)
Generated 28-May-2016 14:58:48 using performance time.
function in file /home/johs/work/clustering/src/cmxCreate_cpu.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
cmxWrite_cpufunction3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
2
dim_suffix = num2str(dims(1));
30.015 s72.2%
4
dim_suffix = [dim_suffix, 'x',...
40.002 s9.0%
5
end
40.001 s5.1%
3
for i = 2:numel(dims)
30.000 s1.9%
6
if strcmp(type, 'single') | st...
30.000 s1.6%
All other lines  0.002 s10.2%
Totals  0.021 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
num2strfunction70.015 s72.1%
Self time (built-ins, overhead, etc.)  0.006 s27.9%
Totals  0.021 s100% 
Code Analyzer results
Line numberMessage
4The variable 'dim_suffix' appears to change size on every loop iteration. Consider preallocating for speed.
6Use || instead of | as the OR operator in (scalar) conditional statements.
6Use || instead of | as the OR operator in (scalar) conditional statements.
8Use || instead of | as the OR operator in (scalar) conditional statements.
Coverage results
Show coverage for parent directory
Total lines in function14
Non-code lines (comments, blank lines)1
Code lines (lines that can run)13
Code lines that did run8
Code lines that did not run5
Coverage (did run/can run)61.54 %
Function listing
time 
Calls 
 line
   1 
function [suffix] = cmxCreate_cpu(type, dims)
  0.02 
      3 
   2 
    dim_suffix = num2str(dims(1)); 
< 0.01 
      3 
   3 
    for i = 2:numel(dims) 
< 0.01 
      4 
   4 
        dim_suffix = [dim_suffix, 'x', num2str(dims(i))]; 
< 0.01 
      4 
   5 
    end 
< 0.01 
      3 
   6 
    if strcmp(type, 'single') | strcmp(type, 'float') | strcmp(type, 'float32') 
      3 
   7 
        dtype = 'f32'; 
   8 
    elseif strcmp(type, 'double') | strcmp(type, 'float64')
   9 
        dtype = 'f64';
  10 
    else
  11 
        dtype = type;
  12 
    end
< 0.01 
      3 
  13 
    suffix = ['.cm', dtype, '_', dim_suffix]; 
< 0.01 
      3 
  14 
end