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
Function Name | Function Type | Calls |
cmxWrite_cpu | function | 3 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
2 | dim_suffix = num2str(dims(1)); | 3 | 0.015 s | 72.2% | ![]() |
4 | dim_suffix = [dim_suffix, 'x',... | 4 | 0.002 s | 9.0% | ![]() |
5 | end | 4 | 0.001 s | 5.1% | ![]() |
3 | for i = 2:numel(dims) | 3 | 0.000 s | 1.9% | ![]() |
6 | if strcmp(type, 'single') | st... | 3 | 0.000 s | 1.6% | ![]() |
All other lines | 0.002 s | 10.2% | ![]() | ||
Totals | 0.021 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
num2str | function | 7 | 0.015 s | 72.1% | ![]() |
Self time (built-ins, overhead, etc.) | 0.006 s | 27.9% | ![]() | ||
Totals | 0.021 s | 100% |
Line number | Message |
4 | The variable 'dim_suffix' appears to change size on every loop iteration. Consider preallocating for speed. |
6 | Use || instead of | as the OR operator in (scalar) conditional statements. |
6 | Use || instead of | as the OR operator in (scalar) conditional statements. |
8 | Use || instead of | as the OR operator in (scalar) conditional statements. |
Total lines in function | 14 |
Non-code lines (comments, blank lines) | 1 |
Code lines (lines that can run) | 13 |
Code lines that did run | 8 |
Code lines that did not run | 5 |
Coverage (did run/can run) | 61.54 % |
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 |