1#ifndef __CACHEINTERFACE_H__
2#define __CACHEINTERFACE_H__
24 CkCacheFillMsg<KeyType> *
msg;
37class EntryTypeGravityParticle :
public CkCacheEntryType<KeyType> {
39 EntryTypeGravityParticle();
41 void *
request(CkArrayIndexMax&, KeyType);
43 void *
unpack(CkCacheFillMsg<KeyType> *,
int, CkArrayIndexMax &);
45 void writeback(CkArrayIndexMax&, KeyType,
void *);
52 static void callback(CkArrayID, CkArrayIndexMax&, KeyType, CkCacheUserData &,
void*,
int);
73class EntryTypeSmoothParticle :
public CkCacheEntryType<KeyType> {
76 EntryTypeSmoothParticle();
78 void *
request(CkArrayIndexMax&, KeyType);
80 void *
unpack(CkCacheFillMsg<KeyType> *,
int, CkArrayIndexMax &);
81 void writeback(CkArrayIndexMax&, KeyType,
void *);
88 static void callback(CkArrayID, CkArrayIndexMax&, KeyType, CkCacheUserData &,
void*,
int);
96class EntryTypeGravityNode :
public CkCacheEntryType<KeyType> {
99 void unpackSingle(CkCacheFillMsg<KeyType> *,
Tree::BinaryTreeNode *,
int, CkArrayIndexMax &,
bool);
101 EntryTypeGravityNode();
102 void * request(CkArrayIndexMax&, KeyType);
103 void * unpack(CkCacheFillMsg<KeyType> *,
int, CkArrayIndexMax &);
104 void writeback(CkArrayIndexMax&, KeyType,
void *);
108 static void callback(CkArrayID, CkArrayIndexMax&, KeyType, CkCacheUserData &,
void*,
int);
The data in a GravityParticle cache entry.
Definition CacheInterface.h:21
ExternalGravityParticle part[1]
Definition CacheInterface.h:32
int begin
Index of the first particle in the home processor's myParticles array.
Definition CacheInterface.h:26
CkCacheFillMsg< KeyType > * msg
Message containing the data for this entry.
Definition CacheInterface.h:24
int end
Index of the last particle in the home processor's myParticles array.
Definition CacheInterface.h:28
particle data in the smooth particle cache messages
Definition CacheInterface.h:60
int nActual
actual number of particles sent
Definition CacheInterface.h:64
KeyType key
Key of this bucket (for writeback)
Definition CacheInterface.h:65
GravityParticle * partCached
particle data
Definition CacheInterface.h:66
int begin
Beginning particle number.
Definition CacheInterface.h:62
extraSPHData * extraSPHCached
particle extraData
Definition CacheInterface.h:67
int end
ending Particle number
Definition CacheInterface.h:63
ExternalSmoothParticle partExt[1]
particle data in the message
Definition CacheInterface.h:68
void free(void *)
free cached data.
Definition CacheInterface.cpp:45
void * request(CkArrayIndexMax &, KeyType)
Request a bucket of particles from a TreePiece.
Definition CacheInterface.cpp:23
void writeback(CkArrayIndexMax &, KeyType, void *)
Do nothing: this is a read-only cache.
Definition CacheInterface.cpp:43
int size(void *)
return size of cached data.
Definition CacheInterface.cpp:49
void * unpack(CkCacheFillMsg< KeyType > *, int, CkArrayIndexMax &)
Return data from fufilled cache request.
Definition CacheInterface.cpp:37
static void callback(CkArrayID, CkArrayIndexMax &, KeyType, CkCacheUserData &, void *, int)
callback to TreePiece after data is received.
Definition CacheInterface.cpp:61
int size(void *)
return size of cached data.
Definition CacheInterface.cpp:176
void writeback(CkArrayIndexMax &, KeyType, void *)
Send the message back to the original TreePiece.
Definition CacheInterface.cpp:145
void * unpack(CkCacheFillMsg< KeyType > *, int, CkArrayIndexMax &)
Return data from fufilled cache request.
Definition CacheInterface.cpp:108
void * request(CkArrayIndexMax &, KeyType)
Request a bucket of particles from a TreePiece.
Definition CacheInterface.cpp:100
void free(void *)
free cached data.
Definition CacheInterface.cpp:169
static void callback(CkArrayID, CkArrayIndexMax &, KeyType, CkCacheUserData &, void *, int)
callback to TreePiece after data is received.
Definition CacheInterface.cpp:182
Information needed to calculate gravity.
Definition GravityParticle.h:33
Class for cross processor data needed for smooth operations.
Definition GravityParticle.h:649
Fundamental type for a particle.
Definition GravityParticle.h:364
A TreeNode with two children.
Definition GenericTreeNode.h:355