summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
authorMahmoud Khairy A. Abdallah <[email protected]>2017-11-18 23:43:56 -0500
committerGitHub Enterprise <[email protected]>2017-11-18 23:43:56 -0500
commit77abdbf7a3c69631bceb5c96f4d3628447487612 (patch)
tree3c8de6a8d14739da6bc035c33a8c47292fe135c9 /src/cuda-sim
parentdccac457bb2263602a6a244297168cae8fda8e47 (diff)
parentf125fecc85fdbb29ed846a2acfdb5e8c6cf20e41 (diff)
Merge pull request #1 from tgrogers/copy-kernel
Copy kernel
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/cuda-sim.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index a668db1..2f166aa 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -401,6 +401,10 @@ void gpgpu_t::memcpy_to_gpu( size_t dst_start_addr, const void *src, size_t coun
char *src_data = (char*)src;
for (unsigned n=0; n < count; n ++ )
m_global_mem->write(dst_start_addr+n,1, src_data+n,NULL,NULL);
+
+ // Copy into the performance model.
+ extern gpgpu_sim* g_the_gpu;
+ g_the_gpu->perf_memcpy_to_gpu(dst_start_addr, count);
if(g_debug_execution >= 3) {
printf( " done.\n");
fflush(stdout);
@@ -416,6 +420,10 @@ void gpgpu_t::memcpy_from_gpu( void *dst, size_t src_start_addr, size_t count )
unsigned char *dst_data = (unsigned char*)dst;
for (unsigned n=0; n < count; n ++ )
m_global_mem->read(src_start_addr+n,1,dst_data+n);
+
+ // Copy into the performance model.
+ extern gpgpu_sim* g_the_gpu;
+ g_the_gpu->perf_memcpy_to_gpu(src_start_addr, count);
if(g_debug_execution >= 3) {
printf( " done.\n");
fflush(stdout);