diff src/share/vm/runtime/gpu.cpp @ 11842:8d8f63069f58

PTX warp limiter to available GPU processors
author Morris Meyer <morris.meyer@oracle.com>
date Mon, 30 Sep 2013 13:03:47 -0400
parents 365d8f385fb5
children f1a55428a8d7
line wrap: on
line diff
--- a/src/share/vm/runtime/gpu.cpp	Mon Sep 30 17:03:14 2013 +0200
+++ b/src/share/vm/runtime/gpu.cpp	Mon Sep 30 13:03:47 2013 -0400
@@ -81,3 +81,13 @@
     return false;
 }
 
+int gpu::available_processors() {
+    if (gpu::has_gpu_linkage()) {
+        if (gpu::get_target_il_type() == gpu::PTX) {
+            return (gpu::Ptx::total_cores());
+        }
+        // Add kernel execution functionality of other GPUs here
+    }
+    return 0;
+}
+