void merge(int mergeCount){ int i = 0; int j = 0; int p = 2; for(j = mergeCount; j>1 ;j=celDivide(j,2)){ oddChunkCorrection(j); for(i = 0; i<j; i += 2){ mergeThread(i, p); }; p = p*2; }; oddChunkCorrection(j); int* result = mergeThread(0, mergeCount); writeCDF(result, sortArray_size, "data.out"); remove("chuck0"); }
void cApplication::procedure() { PROFILE_RESET() updateTime(); update(m_timer->getElapsedTime()); render(); mergeThread(); fileWatching(); m_fps.update(); if (!_getEngineConfig()->getFullScreen()) Sleep(1); }