changeset 10566:a6632ef9c84d

GPU generate_kernel return for Cuda function
author Morris Meyer <morris.meyer@oracle.com>
date Thu, 27 Jun 2013 19:57:43 -0400
parents 52d5ade44b59
children 7cd21876c116
files src/gpu/ptx/gpu_ptx.cpp src/share/vm/runtime/gpu.hpp
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gpu/ptx/gpu_ptx.cpp	Thu Jun 27 19:30:44 2013 -0400
+++ b/src/gpu/ptx/gpu_ptx.cpp	Thu Jun 27 19:57:43 2013 -0400
@@ -55,9 +55,11 @@
   }
 }
 
-void gpu::generate_kernel(unsigned char *code, int code_len, const char *name) {
+void * gpu::generate_kernel(unsigned char *code, int code_len, const char *name) {
   if (gpu::has_gpu_linkage()) {
-    gpu::Ptx::generate_kernel(code, code_len, name);
+    return (gpu::Ptx::generate_kernel(code, code_len, name));
+  } else {
+    return NULL;
   }
 }
 
--- a/src/share/vm/runtime/gpu.hpp	Thu Jun 27 19:30:44 2013 -0400
+++ b/src/share/vm/runtime/gpu.hpp	Thu Jun 27 19:57:43 2013 -0400
@@ -41,7 +41,7 @@
   
   static void initialize_gpu();
   
-  static void generate_kernel(unsigned char *code, int code_len, const char *name);
+  static void * generate_kernel(unsigned char *code, int code_len, const char *name);
 
   static void set_available(bool value) {
     _available = value;