13 #ifndef _INCLUDE_CLIZSAVE
14 #define _INCLUDE_CLIZSAVE
92 memcpy(chunk, CPS2.
chunk,
sizeof(
void*)*num);
93 memcpy(cols, CPS2.
cols,
sizeof(
unsigned int)*num);
94 memcpy(rows, CPS2.
rows,
sizeof(
unsigned int)*num);
103 memcpy(chunk, CPS2.
chunk,
sizeof(
void*)*num);
104 memcpy(cols, CPS2.
cols,
sizeof(
unsigned int)*num);
105 memcpy(rows, CPS2.
rows,
sizeof(
unsigned int)*num);
130 for (
unsigned int i = 0; i <
num; i++)
139 memcpy(indices, iIndices,
sizeof(
unsigned int)*num);
150 memcpy(indices, IS2.
indices,
sizeof(
unsigned int)*num);
157 memcpy(indices, IS2.
indices,
sizeof(
unsigned int)*num);
173 std::vector<ChunkPtrStruct*> stack;
183 Lock lockStack(stackMutex);
184 if (stack.size() < 1)
186 stack.push_back(chunk);
190 stack.insert(stack.begin(), chunk);
193 stackConVar.notify_one();
197 Lock lockStack(stackMutex);
198 while (stack.size() < 1)
200 this->stackConVar.wait(lockStack);
202 chunk = (*stack[stack.size() - 1]);
203 delete stack[stack.size() - 1];
204 stack.erase(stack.end() - 1);
209 Lock lockStack(stackMutex);
214 for (
int i = 0; i < (signed) n; i++)
216 chunk[i] = (*stack[stack.size() - 1]);
217 delete stack[stack.size() - 1];
218 stack.erase(stack.end() - 1);
int numDetected
Definition: cliz.h:59
IndicesStruct & operator=(const IndicesStruct &IS2)
Definition: clizSave.h:141
void setNum(unsigned int iNum)
Definition: clizSave.h:64
Definition: clizSave.h:36
void popBack(ChunkPtrStruct &chunk)
Definition: clizSave.h:195
Definition: clizSave.h:116
MemoryManager * memMan
Definition: clizSave.h:42
int inputComplete
Definition: cliz.h:57
Mutex numAccumulatedMutex
Definition: cliz.h:61
unsigned int num
Definition: clizSave.h:119
~ChunkPtrStruct()
Definition: clizSave.h:58
IndicesStruct(const IndicesStruct &IS2)
Definition: clizSave.h:153
unsigned int num
Definition: clizSave.h:41
Definition: clizFunctions.h:268
void free(memPtr *memAdr)
Definition: clizFunctions.h:480
unsigned int * cols
Definition: clizSave.h:39
void ** chunk
Definition: clizSave.h:38
unsigned int * indices
Definition: clizSave.h:118
ChunkPtrStruct(const ChunkPtrStruct &CPS2)
Definition: clizSave.h:97
boost::mutex::scoped_lock Lock
Definition: clizFunctions.h:44
void diarrhea(ChunkPtrStruct *&chunk, unsigned int &n)
Definition: clizSave.h:207
Save()
Definition: clizSave.h:177
IndicesStruct()
Definition: clizSave.h:120
void pushFront(ChunkPtrStruct *chunk)
Definition: clizSave.h:181
memPtr * allocate(size_t numBytes)
Definition: clizFunctions.h:447
IndicesStruct(unsigned int iNum, unsigned int *iIndices)
Definition: clizSave.h:135
ChunkPtrStruct()
Definition: clizSave.h:44
int numAccumulated
Definition: cliz.h:58
GlobalMemoryManager gMemMan
Definition: clizFunctions.cpp:14
Mutex numDetectedMutex
Definition: cliz.h:62
~IndicesStruct()
Definition: clizSave.h:159
unsigned int * rows
Definition: clizSave.h:40
boost::mutex Mutex
Definition: clizFunctions.h:42
ChunkPtrStruct & operator=(const ChunkPtrStruct &CPS2)
Definition: clizSave.h:77
boost::condition_variable ConVar
Definition: clizFunctions.h:43
ChunkPtrStruct(unsigned int iNum)
Definition: clizSave.h:51
Definition: clizSave.h:170
IndicesStruct(unsigned int iNum)
Definition: clizSave.h:126