-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRequest.h
58 lines (46 loc) · 913 Bytes
/
Request.h
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
#ifndef __REQUEST_H__
#define __REQUEST_H__
#include "Node.h"
template<typename T> class CutoffWorker;
class State;
template<typename T> class Traversal;
struct Requestor {
CutoffWorker<ForceData> *worker;
State *state;
Traversal<ForceData> *traversal;
void *context;
Requestor(CutoffWorker<ForceData> *w, State *s, Traversal<ForceData> * t, void *ctx) :
worker(w),
state(s),
traversal(t),
context(ctx)
{
}
Requestor() :
worker(NULL), state(NULL), traversal(NULL), context(NULL)
{
}
};
struct Request {
// don't need data field
void *data;
bool sent;
CkVec<Requestor> requestors;
void *msg;
Node<ForceData> *parent;
bool parentCached;
Request() :
data(NULL),
sent(false),
msg(NULL),
parent(NULL)
{
}
void reset(){
data = NULL;
sent = false;
}
void deliverParticles(int num);
void deliverNode();
};
#endif