summaryrefslogtreecommitdiff
path: root/MPBenchmarks
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2014-10-23 13:38:50 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2014-10-23 13:38:50 +0800
commit875e184dbc089ca87398b6ef103de91280e7bf33 (patch)
tree683146ff1db300105b5edf2cc75545b46a1f513c /MPBenchmarks
parentaa81fd8b4822014af045f3b597312970319b00b1 (diff)
Revert "Print num of executions"
This reverts commit 13f670a2202fe598ae1cdf44979c90fec3cdcf91. Was for debug only, too noisy. Conflicts: MPBenchmarks/MemoryTasks.cpp
Diffstat (limited to 'MPBenchmarks')
-rw-r--r--MPBenchmarks/MemoryTasks.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/MPBenchmarks/MemoryTasks.cpp b/MPBenchmarks/MemoryTasks.cpp
index e32036d..7daa0d2 100644
--- a/MPBenchmarks/MemoryTasks.cpp
+++ b/MPBenchmarks/MemoryTasks.cpp
@@ -5,14 +5,13 @@
#include <string.h>
+
// GPU
double CopyGPUTask::run(int workgroupSize,size_t sz)
{
cl::Context * c = getContext();
cl::CommandQueue * q = getQueue();
- int ncount = 0;
-
if (c == 0 || q == 0) return -1;
// Check allocation size
@@ -76,7 +75,7 @@ double CopyGPUTask::run(int workgroupSize,size_t sz)
for (int i=0;i<nOps;i++) q->readBuffer(a,false,0,sz,buf);
break;
case DEVICE_TO_DEVICE_COPY:
- for (int i=0;i<nOps;i++) { ncount++; q->copyBuffer(a,b,0,0,sz);}
+ for (int i=0;i<nOps;i++) q->copyBuffer(a,b,0,0,sz);
break;
}
q->finish();
@@ -89,9 +88,6 @@ double CopyGPUTask::run(int workgroupSize,size_t sz)
}
END:
- if (mCT == DEVICE_TO_DEVICE_COPY)
- fprintf(stderr, "call copy buffer %d times\n", ncount);
-
if (buf != 0) _aligned_free(buf);
if (a != 0) delete a;
if (b != 0) delete b;
@@ -103,8 +99,6 @@ double ZeroGPUTask::run(int workgroupSize,size_t sz)
cl::Context * c = getContext();
cl::CommandQueue * q = getQueue();
cl::Program * p = getProgram();
- int ncount = 0;
-
if (c == 0 || q == 0 || p == 0) return -1;
// Check allocation size
@@ -136,7 +130,7 @@ double ZeroGPUTask::run(int workgroupSize,size_t sz)
for (int nOps = 5; ; nOps <<= 1)
{
double t0 = getT();
- for (int i=0;i<nOps;i++) { ncount++; q->execKernel1(kernel,n,workgroupSize);}
+ for (int i=0;i<nOps;i++) q->execKernel1(kernel,n,workgroupSize);
q->finish();
double t = (getT() - t0);
if (t < MIN_RUNNING_TIME) continue;
@@ -147,7 +141,6 @@ double ZeroGPUTask::run(int workgroupSize,size_t sz)
}
END:
- fprintf(stderr, "exec kernel %d times\n", ncount);
if (buf != 0) _aligned_free(buf);
if (a != 0) delete a;
if (kernel != 0) delete kernel;