Escript
Revision_4320
Main Page
Namespaces
Classes
Files
File List
File Members
escript
src
Taipan.h
Go to the documentation of this file.
1
2
/*****************************************************************************
3
*
4
* Copyright (c) 2003-2013 by University of Queensland
5
* http://www.uq.edu.au
6
*
7
* Primary Business: Queensland, Australia
8
* Licensed under the Open Software License version 3.0
9
* http://www.opensource.org/licenses/osl-3.0.php
10
*
11
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12
* Development since 2012 by School of Earth Sciences
13
*
14
*****************************************************************************/
15
16
17
#if !defined escript_Taipan_20050427_H
18
#define escript_Taipan_20050427_H
19
#include "
system_dep.h
"
20
21
namespace
escript {
22
42
class
ESCRIPT_DLL_API
Taipan
{
43
44
public
:
45
46
typedef
long
size_type
;
// needs to be parallelised by openmp. It should not take negative values.
47
// do not assume that it is unsigned though
48
62
Taipan
();
63
77
~
Taipan
();
78
87
double
*
88
new_array(
size_type
dim,
size_type
N
);
89
96
void
97
delete_array(
double
* array);
98
104
void
105
release_unused_arrays();
106
111
int
112
num_arrays();
113
118
int
119
num_arrays(
size_type
N
);
120
125
int
126
num_free(
size_type
N
);
127
132
long
133
num_elements();
134
139
void
140
dump_stats();
141
146
void
147
clear_stats();
148
149
protected
:
150
151
private
:
155
void
operator=
(
const
Taipan
& c){}
156
157
typedef
struct
Taipan_StatTable
{
158
int
requests
;
159
int
frees
;
160
int
allocations
;
161
int
deallocations
;
162
long
allocated_elements
;
163
long
deallocated_elements
;
164
long
max_tab_size
;
165
}
Taipan_StatTable
;
166
167
Taipan_StatTable
*
statTable
;
168
169
typedef
struct
Taipan_MemTable
{
170
double
*
array
;
171
size_type
dim
;
172
size_type
N
;
173
int
numThreads
;
174
bool
free
;
175
struct
Taipan_MemTable
*
next
;
176
}
Taipan_MemTable
;
177
178
Taipan_MemTable
*
memTable_Root
;
179
180
long
totalElements
;
181
182
};
183
184
}
// end of namespace
185
186
#endif
Generated on Fri Mar 15 2013 14:07:51 for Escript by
1.8.1.2