libfaster API Documentation
Development Version
Super fast distributted computing
indexedFddStorage.h
1
#ifndef LIBFASTER_INDEXEDFDDSTORAGE_H
2
#define LIBFASTER_INDEXEDFDDSTORAGE_H
3
4
5
#include <cstdlib>
6
7
#include "definitions.h"
8
#include "fddStorageBase.h"
9
10
namespace
faster
{
11
12
template
<
class
K,
class
T>
class
indexedFddStorage;
13
14
template
<
class
K,
class
T>
15
class
indexedFddStorageCore
:
public
fddStorageBase
{
16
protected
:
17
T * localData;
18
K * localKeys;
19
public
:
20
indexedFddStorageCore
();
21
indexedFddStorageCore
(
size_t
s);
22
23
~
indexedFddStorageCore
();
24
25
T * getData();
26
K * getKeys();
27
void
setSize(
size_t
s UNUSED) {};
28
29
T & operator[](
size_t
ref);
30
31
void
sortByKey();
32
};
33
34
// FDD storage place
35
// Stores worker's FDD data locally
36
template
<
class
K,
class
T>
37
class
indexedFddStorage
:
public
indexedFddStorageCore
<K, T> {
38
public
:
39
indexedFddStorage
();
40
indexedFddStorage
(
size_t
s);
41
indexedFddStorage
(K * keys, T * data,
size_t
s);
42
void
setData( K * keys, T * data,
size_t
s);
43
void
setDataRaw(
void
* keys,
void
* data,
size_t
s);
44
45
void
setSize(
size_t
s)
override
;
46
47
void
insert(K key, T & item);
48
void
insertRaw(
void
* d,
size_t
s);
49
50
void
grow(
size_t
toSize);
51
void
shrink();
52
};
53
54
template
<
class
K,
class
T>
55
class
indexedFddStorage
<K, T *> :
public
indexedFddStorageCore<K, T *>
{
56
private
:
57
size_t
* lineSizes;
58
59
public
:
60
indexedFddStorage
();
61
indexedFddStorage
(
size_t
s);
62
indexedFddStorage
(K * keys, T ** data,
size_t
* lineSizes,
size_t
s);
63
64
~
indexedFddStorage
();
65
66
void
setData( K * keys, T ** data,
size_t
* lineSizes,
size_t
s);
67
void
setDataRaw(
void
* keys,
void
* data,
size_t
* lineSizes,
size_t
s);
68
void
setSize(
size_t
s)
override
;
69
70
void
insert(K key, T *& item,
size_t
s);
71
void
insertRaw(
void
* d,
size_t
s);
72
73
size_t
* getLineSizes();
74
75
void
grow(
size_t
toSize);
76
void
shrink();
77
};
78
79
80
}
81
82
#endif
faster::indexedFddStorageCore
Definition:
indexedFddStorage.h:15
faster::indexedFddStorage
Definition:
_workerIFdd.h:23
faster
libfaster main namespace
Definition:
_workerFdd.h:11
faster::fddStorageBase
Definition:
fddStorageBase.h:10
faster.git
src
include
indexedFddStorage.h
Generated on Tue Nov 22 2016 19:01:07 for libfaster API Documentation by
1.8.12