From efbf078d96d409e193943a393e8050fea22bd705 Mon Sep 17 00:00:00 2001
From: Neil Gershenfeld <gersh@cba.mit.edu>
Date: Mon, 10 Feb 2020 12:18:12 -0500
Subject: [PATCH] wip

---
 Python/numbapig.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Python/numbapig.py b/Python/numbapig.py
index 7f68a25..f8a562e 100644
--- a/Python/numbapig.py
+++ b/Python/numbapig.py
@@ -112,4 +112,17 @@ mflops = NPTS*5.0/(1.0e6*(end_time-start_time))
 print("both with CUDA kernel reduction:")
 print("   NPTS = %d, pi = %f"%(NPTS,pi[0]))
 print("   time = %f, estimated MFlops = %f"%(end_time-start_time,mflops))
+#
+# both with CUDA kernel reduction and transfer
+#
+start_time = time.time()
+init[grid_size,block_size](arr)
+CUDA_reduce(arr,NPTS)
+CUDA_result(arr,result)
+pi = result.copy_to_host()
+end_time = time.time()
+mflops = NPTS*5.0/(1.0e6*(end_time-start_time))
+print("both with CUDA kernel reduction and transfer:")
+print("   NPTS = %d, pi = %f"%(NPTS,pi[0]))
+print("   time = %f, estimated MFlops = %f"%(end_time-start_time,mflops))
 
-- 
GitLab