Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalCompilerToGPU.cpp @ 10563:7a3499bf5e2c
PTX kernel get_function return
author | Morris Meyer <morris.meyer@oracle.com> |
---|---|
date | Thu, 27 Jun 2013 19:22:42 -0400 |
parents | ed6202820ecf |
children | 9c7d9e2c8326 |
comparison
equal
deleted
inserted
replaced
10562:12d134c0aa8d | 10563:7a3499bf5e2c |
---|---|
50 } | 50 } |
51 jboolean is_copy; | 51 jboolean is_copy; |
52 jbyte *bytes = env->GetByteArrayElements(code, &is_copy); | 52 jbyte *bytes = env->GetByteArrayElements(code, &is_copy); |
53 jint len = env->GetArrayLength(code); | 53 jint len = env->GetArrayLength(code); |
54 const char *namestr = env->GetStringUTFChars(name, &is_copy); | 54 const char *namestr = env->GetStringUTFChars(name, &is_copy); |
55 gpu::generate_kernel((unsigned char *)bytes, len, namestr); | 55 void *kernel = gpu::generate_kernel((unsigned char *)bytes, len, namestr); |
56 env->ReleaseByteArrayElements(code, bytes, 0); | 56 env->ReleaseByteArrayElements(code, bytes, 0); |
57 env->ReleaseStringUTFChars(name, namestr); | 57 env->ReleaseStringUTFChars(name, namestr); |
58 | 58 |
59 return 42; | 59 return (jlong)kernel; |
60 C2V_END | 60 C2V_END |
61 | 61 |
62 C2V_VMENTRY(jboolean, deviceInit, (JNIEnv *env, jobject)) | 62 C2V_VMENTRY(jboolean, deviceInit, (JNIEnv *env, jobject)) |
63 if (gpu::is_available() == false || gpu::has_gpu_linkage() == false) { | 63 if (gpu::is_available() == false || gpu::has_gpu_linkage() == false) { |
64 tty->print_cr("deviceInit - not available / no linkage"); | 64 tty->print_cr("deviceInit - not available / no linkage"); |