-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
105 lines (85 loc) · 3.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Dejan D. M. Milosavljevic">
<!-- <link rel="icon" href="../favicon.ico" type="image/ico"> -->
<title>Counter</title>
</head>
<body>
<h1 align="center">Counter</h1>
<dl>
<dt><h3>TOC</h3></dt>
<dd>
<ul>
<li><a href="#Description">Description</a></li>
<li><a href="#Install">Install</a></li>
<li><a href="#API">API</a></li>
<li><a href="#Using">Using</a></li>
<li><a href="#Examples">Examples</a></li>
<li><a href="#FAQ">FAQ</a></li>
</ul>
</dd>
<dt><h3><a name="Description">Description</a></h3></dt>
<dd>Count (make statistic) of used operator/functions . </dd>
<dt><h3><a name="Install"></a>Install</a></h3></dt>
<dd>
<ol>
<li>Clone the project from github.</li>
<li>Optional: Copy <code>src</code> folder in some for your suitable place.<br>
If you want to use directly from place where you clone counter project you may skip this step.
</li>
<li>Put <code>src</code> in your path.<br> If you copy <code>src</code> in someplace that is already in your path then skip this step.</li>
</ol>
Done!<br>
</dd>
<dt><h3><a name="API">API</a></h3></dt>
<dd>
Starting points:
<ul>
<li><a href="./integrate.html">Integration</a></li>
<li><a href="./parallel.html">Paralle statistic.</a></li>
<li><a href="./const.html">Constants.</a></li>
<li><a href="./number.html">Number class.</a></li>
</ul>
</dd>
<dt><h3><a name="Using">Using</a></h3></dt>
<dd>
Include <code>counter.hpp</code> situated in <code>src/counter</code> directory.<br><br>
</dd>
<dt><h3><a name="Examples">Examples</a></h3></dt>
<dd>
"Hello World" example:
<blockquote><code><pre>
#include <iostream>
#include <iomanip>
#include "counter/counter.hpp"
struct MyCategory{};
typedef ::counter::number<MyCategory, double> MyDouble;
int main( int argc, char *argv[] )
{
MyDouble a, b, c;
a = a + b + - c;
std::cout << "Number of calls of assignment operator: "
<< MyDouble::statistics()[ ::counter::constant::operator_assign ]
<< std::endl
<< "Number of calls of binary plus operator: "
<< MyDouble::statistics()[ ::counter::constant::operator_plus_binary ]
<< std::endl
<< "Number of calls of unary minus: "
<< MyDouble::statistics()[ ::counter::constant::operator_minus_unary ]
<< std::endl;
return EXIT_SUCCESS;
}
</pre></code></blockquote>
In the root of the project there is folder <code>example</code>.<br> It's contain <i>one-file-example</i>s e.g all examples are in form that do not need additional file to be compiled i.e self-sufficient examples.<br>
<code>make_all.sh</code> will compile all examples by using <code>g++</code>.
</dd>
<dt><h3><a name="FAQ">FAQ</a></h3></dt>
<dd>
<a href="./faq.html">Frequently Asked questions</a>
</dd>
</dl>
<hr>
</body>
</html>