Commit 1aed88db authored by Martin Perdacher's avatar Martin Perdacher
Browse files

timer

parent 4ff3ea06
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#include <boost/lockfree/queue.hpp>
#include <boost/atomic.hpp>

#include "measure/timer.h"
#include "util/allocation.h"
#include "util/arguments.h"
#include "util/dataIo.h"
@@ -37,6 +38,7 @@ int main(int argc, char** argv) {
    size_t M=200;
    size_t blocksize=4000, joinCounts=0;
    double EPS=0.2;
    CUtilTimer timer;

    parsing_args(argc, argv, &N, &EPS, &D, &threads, &blocksize, filename, &isBinary);

@@ -56,11 +58,13 @@ int main(int argc, char** argv) {
        read_file(x, N, D, filename, isBinary);
    }

    timer.start();
#ifdef COUNT_ONLY
    blasSelfJoinCountOnly( x, N, D, EPS, threads, blocksize, &joinCounts);
#else
    blasSelfJoinStoreResults( x, N, D, EPS, threads, blocksize, &joinCounts, queue);
#endif
    timer.stop();

#ifndef COUNT_ONLY
    // if we materialize with a non-blocking linked list, then joincounts are zero
@@ -74,7 +78,7 @@ int main(int argc, char** argv) {
#pragma omp parallel
{
    if (  omp_get_thread_num() == 0 ){
        printf("%ld;%ld;%2.12f;%ld;%d;%lu\n", N, D, EPS, blocksize, omp_get_num_threads(), joinCounts);
        printf("%ld;%ld;%2.12f;%ld;%d;%f;%lu\n", N, D, EPS, blocksize, omp_get_num_threads(), timer.get_time(), joinCounts);
    }
}

+5 −2
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#include <boost/lockfree/queue.hpp>
#include <boost/atomic.hpp>

#include "measure/timer.h"
#include "util/allocation.h"
#include "util/arguments.h"
#include "util/dataIo.h"
@@ -39,6 +40,7 @@ int main(int argc, char** argv) {
    size_t M=200;
    size_t blocksize=4000, joinCounts=0;
    double EPS=0.2;
    CUtilTimer timer;

    parsing_args_join(argc, argv, &N, &M, &EPS, &D, &threads, &blocksize, filename, filename2, &isBinary);

@@ -62,12 +64,13 @@ int main(int argc, char** argv) {
        read_file(x2, M, D, filename, isBinary);
    }


    timer.start();
#ifdef COUNT_ONLY
    blasJoinCountOnly( x1, N, x2, M, D, EPS, threads, blocksize, &joinCounts);
#else
    // blasJoinStoreResults( x, N, D, EPS, threads, blocksize, &joinCounts, queue);
#endif
    timer.stop();

#ifndef COUNT_ONLY
    // if we materialize with a non-blocking linked list, then joincounts are zero
@@ -81,7 +84,7 @@ int main(int argc, char** argv) {
#pragma omp parallel
{
    if (  omp_get_thread_num() == 0 ){
        printf("%ld;%ld;%2.12f;%ld;%d;%lu\n", N, D, EPS, blocksize, omp_get_num_threads(), joinCounts);
        printf("%ld;%ld;%2.12f;%ld;%d;%f;%lu\n", N, D, EPS, blocksize, omp_get_num_threads(), timer.get_time(), joinCounts);
    }
}