Mercurial > hg > graal-jvmci-8
diff src/share/vm/graal/graalCompilerToGPU.cpp @ 11902:67a1e27a8dbb
PTX initial float and double
author | Morris Meyer <morris.meyer@oracle.com> |
---|---|
date | Sun, 06 Oct 2013 22:07:23 -0400 |
parents | 8d8f63069f58 |
children | f87c68d79f07 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToGPU.cpp Sun Oct 06 18:15:56 2013 -0400 +++ b/src/share/vm/graal/graalCompilerToGPU.cpp Sun Oct 06 22:07:23 2013 -0400 @@ -96,7 +96,20 @@ } else { oop o = java_lang_boxing_object::create(ptxka.get_ret_type(), (jvalue *) result.get_value_addr(), CHECK_NULL); if (TraceGPUInteraction) { - tty->print_cr("GPU execution returned %d", result.get_jint()); + switch (ptxka.get_ret_type()) { + case T_INT: + tty->print_cr("GPU execution returned %d", result.get_jint()); + break; + case T_FLOAT: + tty->print_cr("GPU execution returned %f", result.get_jfloat()); + break; + case T_DOUBLE: + tty->print_cr("GPU execution returned %f", result.get_jdouble()); + break; + default: + tty->print_cr("GPU returned unhandled"); + break; + } } return JNIHandles::make_local(o); } @@ -135,7 +148,20 @@ } else { oop o = java_lang_boxing_object::create(ptxka.get_ret_type(), (jvalue *) result.get_value_addr(), CHECK_NULL); if (TraceGPUInteraction) { - tty->print_cr("GPU execution returned %d", result.get_jint()); + switch (ptxka.get_ret_type()) { + case T_INT: + tty->print_cr("GPU execution returned %d", result.get_jint()); + break; + case T_FLOAT: + tty->print_cr("GPU execution returned %f", result.get_jfloat()); + break; + case T_DOUBLE: + tty->print_cr("GPU execution returned %g", result.get_jdouble()); + break; + default: + tty->print_cr("GPU returned unhandled"); + break; + } } return JNIHandles::make_local(o); }