MuseScore  3.4
Music composition and notation
utils.h
Go to the documentation of this file.
1 //=============================================================================
2 // MusE Reader
3 // Linux Music Score Reader
4 //
5 // Copyright (C) 2010 Werner Schweer
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __UTILS_H__
21 #define __UTILS_H__
22 
23 namespace Ms {
24 
25 extern double curTime();
26 
27 //---------------------------------------------------------
28 // Benchmark
29 //---------------------------------------------------------
30 
31 class Benchmark {
32  double startTime;
33  const char* msg;
34 
35  public:
36  Benchmark(const char* p) {
37  msg = p;
38  startTime = curTime();
39 //printf("===%s start\n", msg);
40  }
42 //double elapsed = curTime() - startTime;
43 //printf("===%s elapsed %f\n", msg, elapsed);
44  }
45  };
46 
47 extern double covariance(const double data1[], const double data2[], int n);
48 
49 }
50 
51 #endif
52 
const char * msg
Definition: utils.h:33
Definition: utils.h:31
Benchmark(const char *p)
Definition: utils.h:36
~Benchmark()
Definition: utils.h:41
double covariance(const double data1[], const double data2[], int n, double mean1, double mean2)
Definition: utils.cpp:64
Definition: aeolus.cpp:26
double startTime
Definition: utils.h:32
double curTime()