Line | |
---|
1 | #include "mex.h" |
---|
2 | #include "flops.h" |
---|
3 | |
---|
4 | void addflops(unsigned fl) |
---|
5 | { |
---|
6 | #if 0 |
---|
7 | mxArray *flopcount = mexGetArray("flopcount","global"); |
---|
8 | if(flopcount && !mxIsEmpty(flopcount))) { |
---|
9 | *mxGetPr(flopcount) += fl; |
---|
10 | mexPutArray(flopcount,"global"); |
---|
11 | } |
---|
12 | #else |
---|
13 | /* Matlab 6.5 */ |
---|
14 | mxArray *flopcount = mexGetVariable("global","flopcount"); |
---|
15 | if(flopcount && !mxIsEmpty(flopcount)) { |
---|
16 | *mxGetPr(flopcount) += fl; |
---|
17 | mexPutVariable("global","flopcount",flopcount); |
---|
18 | } |
---|
19 | #endif |
---|
20 | } |
---|
21 | |
---|
Note: See
TracBrowser
for help on using the repository browser.