Taipan.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2017 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014 by Centre for Geoscience Computing (GeoComp)
*
*****************************************************************************/
#if !defined escript_Taipan_20050427_H
#define escript_Taipan_20050427_H
#include "system_dep.h"
namespace escript {
class ESCRIPT_DLL_API Taipan {
public:
typedef long size_type; // needs to be parallelised by openmp. It should not take negative values.
// do not assume that it is unsigned though
Taipan();
~Taipan();
double*
new_array(size_type dim, size_type N);
void
delete_array(double* array);
void
release_unused_arrays();
int
num_arrays();
int
num_arrays(size_type N);
int
num_free(size_type N);
long
num_elements();
void
dump_stats();
void
clear_stats();
protected:
private:
void operator=(const Taipan& c){}
typedef struct Taipan_StatTable {
int requests;
int frees;
int allocations;
int deallocations;
long allocated_elements;
long deallocated_elements;
long max_tab_size;
} Taipan_StatTable;
Taipan_StatTable* statTable;
typedef struct Taipan_MemTable {
double* array;
size_type dim;
size_type N;
int numThreads;
bool free;
struct Taipan_MemTable* next;
} Taipan_MemTable;
Taipan_MemTable* memTable_Root;
long totalElements;
};
} // end of namespace
#endif
escript::Taipan::Taipan_MemTable::array
double * array
Definition: Taipan.h:171
escript::Taipan::Taipan_StatTable::allocated_elements
long allocated_elements
Definition: Taipan.h:163
escript
Definition: AbstractContinuousDomain.cpp:22
escript::Taipan::Taipan_MemTable::dim
size_type dim
Definition: Taipan.h:172
escript::Taipan::totalElements
long totalElements
Definition: Taipan.h:181
escript::Taipan::statTable
Taipan_StatTable * statTable
Definition: Taipan.h:168
escript::Taipan::Taipan_StatTable::frees
int frees
Definition: Taipan.h:160
escript::Taipan::Taipan_MemTable::free
bool free
Definition: Taipan.h:175
escript::Taipan::memTable_Root
Taipan_MemTable * memTable_Root
Definition: Taipan.h:179
system_dep.h
escript::Taipan::Taipan_StatTable
Definition: Taipan.h:158
escript::Taipan::operator=
void operator=(const Taipan &c)
Definition: Taipan.h:156
escript::Taipan::size_type
long size_type
Definition: Taipan.h:47
escript::Taipan::Taipan_MemTable::next
struct Taipan_MemTable * next
Definition: Taipan.h:176
paso::N
static dim_t N
Definition: SparseMatrix_saveHB.cpp:37
escript::Taipan
Taipan array manager, C++ version. Based on TaipanMemManager C module by Lutz Gross.
Definition: Taipan.h:43
escript::Taipan::Taipan_StatTable::deallocated_elements
long deallocated_elements
Definition: Taipan.h:164
escript::Taipan::Taipan_StatTable::requests
int requests
Definition: Taipan.h:159
ESCRIPT_DLL_API
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:29
escript::Taipan::Taipan_MemTable
Definition: Taipan.h:170
escript::Taipan::Taipan_StatTable::max_tab_size
long max_tab_size
Definition: Taipan.h:165
escript::Taipan::Taipan_StatTable::allocations
int allocations
Definition: Taipan.h:161
escript::Taipan::Taipan_StatTable::deallocations
int deallocations
Definition: Taipan.h:162
escript::Taipan::Taipan_MemTable::numThreads
int numThreads
Definition: Taipan.h:174
escript::Taipan::Taipan_MemTable::N
size_type N
Definition: Taipan.h:173