source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/flops.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 809 bytes
Line 
1function f = flops(fl)
2% FLOPS         Get or set the global flopcount variable.
3% FLOPS returns the current flopcount.
4% FLOPS(F) sets flopcount to F.
5%
6% 0 flops: -x ' repmat
7% 1 flop each: + - .*
8% 2 flops each: < > == ~=
9% For complex numbers, + is 2 flops, * is 6 flops.
10% col_sum(x) takes (rows(x)-1)*cols(x) flops (use FLOPS_COL_SUM).
11% row_sum(x) takes rows(x)*(cols(x)-1) flops (use FLOPS_ROW_SUM).
12% Use FLOPS_DIV for ./
13% Use FLOPS_RANDNORM for randn
14% Use FLOPS_SQRT for sqrt
15% Use FLOPS_POW for .^
16% Use FLOPS_EXP for exp
17% Use FLOPS_LOG for log, sin, and other special functions.
18%
19% See FLOPS_MUL, FLOPS_SOLVE, FLOPS_INV, FLOPS_CHOL, FLOPS_DET, ...
20
21global flopcount;
22if nargin == 1
23  flopcount = fl;
24  if nargout == 1
25    f = fl;
26  end
27else
28  f = flopcount;
29end
Note: See TracBrowser for help on using the repository browser.