Skip to content

Commit

Permalink
fixed pagerank calculations & time reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
liuexp committed Mar 5, 2013
1 parent b80b227 commit 085c02a
Show file tree
Hide file tree
Showing 3 changed files with 814 additions and 28 deletions.
6 changes: 6 additions & 0 deletions common.h
Expand Up @@ -8,6 +8,7 @@
#endif

#include<map>
#include<ctime>

//const float RANDRESET = 0.15;
const float DAMPINGFACTOR = 0.85;
Expand All @@ -23,6 +24,7 @@ const unsigned int nnz =1446476275;
const int niter = 4;
const int topK = 20;
clock_t tt0;
time_t realt0, realt1;

typedef struct adjTuple{
int u,v;
Expand Down Expand Up @@ -58,6 +60,10 @@ void FIXLINE(char *s){
if(s[l] == '\n')s[l] = 0;
}

void reportTimeReal(){
time(&realt1);
printf("-- ELAPSED REAL TIME: %.3fs\n", difftime(realt1, realt0));
}
void reportTime(clock_t tt0){
printf("-- ELAPSED TIME: %.3fs\n", ((double)clock() - tt0)/CLOCKS_PER_SEC);
}
Expand Down

0 comments on commit 085c02a

Please sign in to comment.