Skip to content
Snippets Groups Projects
Commit efbf078d authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

wip

parent e300c310
No related branches found
No related tags found
No related merge requests found
Pipeline #4937 passed
......@@ -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))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment