Faster  0.0.4Alpha
Superfastdistributtedcomputing
workerFddBase.h
1 #ifndef LIBFASTER_WORKERFDDBASE_H
2 #define LIBFASTER_WORKERFDDBASE_H
3 
4 #include <cstdlib>
5 
6 #include "definitions.h"
7 
8 namespace faster{
9 
10  class fastCommBuffer;
11  class fastComm;
12  class workerFddBase;
13 
14 
16  protected:
17  unsigned long int id;
18  fddType type;
19  fddType keyType;
20  public:
21  workerFddBase() ;
22  workerFddBase(unsigned int ident, fddType t);
23  virtual ~workerFddBase() = 0;
24 
25  virtual fddType getType() = 0;
26  virtual fddType getKeyType() = 0;
27 
28  virtual void setData( void *, size_t) = 0;
29  virtual void setData( void *, size_t *, size_t) = 0;
30  virtual void setData( void *, void *, size_t) = 0;
31  virtual void setData( void *, void *, size_t *, size_t) = 0;
32 
33  virtual void setDataRaw( void *, size_t) = 0;
34  virtual void setDataRaw( void *, size_t *, size_t) = 0;
35  virtual void setDataRaw( void *, void *, size_t) = 0;
36  virtual void setDataRaw( void *, void *, size_t *, size_t) = 0;
37 
38  virtual void * getItem(size_t) = 0;
39 
40  virtual void * getKeys() = 0;
41  virtual void * getData() = 0;
42  virtual size_t getSize() = 0;
43  virtual size_t * getLineSizes() = 0;
44  virtual void setSize(size_t s) = 0;
45 
46  virtual size_t itemSize() = 0;
47  virtual size_t baseSize() = 0;
48 
49  virtual void deleteItem(void * item) = 0;
50 
51  virtual void shrink() = 0;
52  virtual void insertl(void * v) = 0;
53  virtual void insert(void * k, void * v, size_t s) = 0;
54 
55  virtual void preapply(unsigned long int id, void * func, fddOpType op, workerFddBase * dest, fastComm * comm) = 0;
56  virtual void apply(void * func, fddOpType op, workerFddBase * dest, fastCommBuffer & buffer) = 0;
57 
58  virtual void collect(fastComm * comm) = 0;
59  virtual void exchangeDataByKey(fastComm *comm, void * keyMap) = 0;
60  virtual std::vector< std::vector<void*> > * getKeyLocations() = 0;
61  };
62 }
63 
64 #endif
Definition: fastComm.h:116
Definition: workerFddBase.h:15
Definition: fastCommBuffer.h:15
Definition: _workerFdd.h:11