diff src/gpu/ptx/vm/gpu_ptx.cpp @ 11822:365d8f385fb5

PTX: one-dimensional parallel warp invocation, ParallelOver annotation
author Morris Meyer <morris.meyer@oracle.com>
date Sun, 29 Sep 2013 14:47:12 -0400
parents d8659ad83fcc
children 8d8f63069f58
line wrap: on
line diff
--- a/src/gpu/ptx/vm/gpu_ptx.cpp	Sat Sep 28 21:06:12 2013 -0400
+++ b/src/gpu/ptx/vm/gpu_ptx.cpp	Sun Sep 29 14:47:12 2013 -0400
@@ -228,15 +228,20 @@
 }
 
 bool gpu::Ptx::execute_kernel(address kernel, PTXKernelArguments &ptxka, JavaValue &ret) {
+    return gpu::Ptx::execute_warp(1, 1, 1, kernel, ptxka, ret);
+}
+
+bool gpu::Ptx::execute_warp(int dimX, int dimY, int dimZ,
+                            address kernel, PTXKernelArguments &ptxka, JavaValue &ret) {
   // grid dimensionality
   unsigned int gridX = 1;
   unsigned int gridY = 1;
   unsigned int gridZ = 1;
 
   // thread dimensionality
-  unsigned int blockX = 1;
-  unsigned int blockY = 1;
-  unsigned int blockZ = 1;
+  unsigned int blockX = dimX;
+  unsigned int blockY = dimY;
+  unsigned int blockZ = dimZ;
 
   struct CUfunc_st* cu_function = (struct CUfunc_st*) kernel;
 
@@ -264,7 +269,7 @@
   }
 
   if (TraceGPUInteraction) {
-    tty->print_cr("[CUDA] Success: Kernel Launch");
+    tty->print_cr("[CUDA] Success: Kernel Launch: X: %d Y: %d Z: %d", blockX, blockY, blockZ);
   }
 
   status = _cuda_cu_ctx_synchronize();