diff src/gpu/ptx/vm/gpu_ptx.hpp @ 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 c7abc8411011
line wrap: on
line diff
--- a/src/gpu/ptx/vm/gpu_ptx.hpp	Mon Sep 30 17:03:14 2013 +0200
+++ b/src/gpu/ptx/vm/gpu_ptx.hpp	Mon Sep 30 13:03:47 2013 -0400
@@ -34,6 +34,7 @@
 #define GRAAL_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING        41
 #define GRAAL_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR  75
 #define GRAAL_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR  76
+#define GRAAL_CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT      16
 #define GRAAL_CU_JIT_MAX_REGISTERS                           0
 #define GRAAL_CU_JIT_THREADS_PER_BLOCK                       1
 #define GRAAL_CU_JIT_INFO_LOG_BUFFER                         3
@@ -73,6 +74,7 @@
  protected:
   static bool probe_linkage();
   static bool initialize_gpu();
+  static unsigned int total_cores();
   static void * generate_kernel(unsigned char *code, int code_len, const char *name);
   static bool execute_warp(int dimX, int dimY, int dimZ, address kernel, PTXKernelArguments & ka, JavaValue &ret);
   static bool execute_kernel(address kernel, PTXKernelArguments & ka, JavaValue &ret);