void SimpleCounter::attach(Q_PID pid) { worker = new SimpleCounterWorker( (DWORD)pid); QThread* thread = new QThread; worker->setInterval( SAMPLING_INTERVAL); /* Connect thread and worker objects signals/slots */ QObject::connect( thread, SIGNAL( started()), worker, SLOT( startCount())); QObject::connect( worker, SIGNAL( finished()), worker, SLOT( deleteLater())); QObject::connect( thread, SIGNAL( finished()), thread, SLOT( deleteLater())); QObject::connect( this, SIGNAL( valuesRequest()), worker, SLOT( getValues())); QObject::connect( worker, SIGNAL( valuesReady( SimpleValues_t*)), this, SLOT( receiveValues( SimpleValues_t*))); worker->moveToThread(thread); }
ContentFolder::ContentFolder(SharedCoreIO const &io, std::string const &name, bool const enforceRootBlock) : m_io(io) , m_folderData(m_io, name, enforceRootBlock) , m_startVolumeBlock(m_folderData.getStartVolumeBlockIndex()) , m_name(name) , m_entryCount(0) , m_entryInfoCacheMap() , m_checkForEarlyMetaData(true) , m_oldSpaceAvailableForEntry(false) { // set initial number of entries; there will be none to begin with uint64_t startCount(0); uint8_t buf[8]; detail::convertUInt64ToInt8Array(startCount, buf); (void)m_folderData.write((char*)buf, 8); m_folderData.flush(); }
int main( int argc, const char* argv[] ) { int i,j,iret; double first[SIZE][SIZE]; double second[SIZE][SIZE]; double multiply[SIZE][SIZE]; double dtime; for (i = 0; i < SIZE; i++) { //rows in first for (j = 0; j < SIZE; j++) { //columns in first first[i][j]=i+j; second[j][i]=i-j; multiply[i][j]=0.0; } } init(); startCount(atoi(argv[1])); iret=mm(first,second,multiply); stopAndPrint(); return iret; }
int main(int argc, char** argv) { double *A; int n, ret, event; double startTime; double endTime; long long value; n = atoi(argv[2]); A = load_matrix(argv[1], n); event = atoi(argv[3]); init(); startCount(event); startTime = dclock(); ret = chol(A, n); stopAndPrint(); endTime = dclock(); // printf("%lf\n", endTime - startTime); free(A); return 0; }