Mercurial > hg > graal-jvmci-8
comparison src/gpu/hsail/vm/hsailKernelArguments.cpp @ 13888:51584f76462d
pulled Ptx and Hsail classes out of gpu class namespace
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 06 Feb 2014 11:14:19 +0100 |
parents | 89fbf495e589 |
children | d9aad522d355 |
comparison
equal
deleted
inserted
replaced
13887:f3e4f746e9c6 | 13888:51584f76462d |
---|---|
44 assert(java_lang_boxing_object::is_instance(arg, T_BOOLEAN), "arg type mismatch"); | 44 assert(java_lang_boxing_object::is_instance(arg, T_BOOLEAN), "arg type mismatch"); |
45 | 45 |
46 jvalue jValue; | 46 jvalue jValue; |
47 java_lang_boxing_object::get_value(arg, &jValue); | 47 java_lang_boxing_object::get_value(arg, &jValue); |
48 | 48 |
49 bool pushed = gpu::Hsail::_okra_push_boolean(_kernel, jValue.z); | 49 bool pushed = Hsail::_okra_push_boolean(_kernel, jValue.z); |
50 assert(pushed == true, "arg push failed"); | 50 assert(pushed == true, "arg push failed"); |
51 } | 51 } |
52 | 52 |
53 void HSAILKernelArguments::do_byte() { | 53 void HSAILKernelArguments::do_byte() { |
54 // Get the boxed value | 54 // Get the boxed value |
56 assert(java_lang_boxing_object::is_instance(arg, T_BYTE), "arg type mismatch"); | 56 assert(java_lang_boxing_object::is_instance(arg, T_BYTE), "arg type mismatch"); |
57 | 57 |
58 jvalue jValue; | 58 jvalue jValue; |
59 java_lang_boxing_object::get_value(arg, &jValue); | 59 java_lang_boxing_object::get_value(arg, &jValue); |
60 | 60 |
61 bool pushed = gpu::Hsail::_okra_push_byte(_kernel, jValue.b); | 61 bool pushed = Hsail::_okra_push_byte(_kernel, jValue.b); |
62 assert(pushed == true, "arg push failed"); | 62 assert(pushed == true, "arg push failed"); |
63 } | 63 } |
64 | 64 |
65 void HSAILKernelArguments::do_double() { | 65 void HSAILKernelArguments::do_double() { |
66 // Get the boxed value | 66 // Get the boxed value |
70 jvalue jValue; | 70 jvalue jValue; |
71 java_lang_boxing_object::get_value(arg, &jValue); | 71 java_lang_boxing_object::get_value(arg, &jValue); |
72 if (TraceGPUInteraction) { | 72 if (TraceGPUInteraction) { |
73 tty->print_cr("[HSAIL] HSAILKernelArguments::double value = %e", jValue.d); | 73 tty->print_cr("[HSAIL] HSAILKernelArguments::double value = %e", jValue.d); |
74 } | 74 } |
75 bool pushed = gpu::Hsail::_okra_push_double(_kernel, jValue.d); | 75 bool pushed = Hsail::_okra_push_double(_kernel, jValue.d); |
76 assert(pushed == true, "arg push failed"); | 76 assert(pushed == true, "arg push failed"); |
77 } | 77 } |
78 | 78 |
79 void HSAILKernelArguments::do_float() { | 79 void HSAILKernelArguments::do_float() { |
80 // Get the boxed value | 80 // Get the boxed value |
84 jvalue jValue; | 84 jvalue jValue; |
85 java_lang_boxing_object::get_value(arg, &jValue); | 85 java_lang_boxing_object::get_value(arg, &jValue); |
86 if (TraceGPUInteraction) { | 86 if (TraceGPUInteraction) { |
87 tty->print_cr("[HSAIL] HSAILKernelArguments::float value = %f", jValue.f); | 87 tty->print_cr("[HSAIL] HSAILKernelArguments::float value = %f", jValue.f); |
88 } | 88 } |
89 bool pushed = gpu::Hsail::_okra_push_float(_kernel, jValue.f); | 89 bool pushed = Hsail::_okra_push_float(_kernel, jValue.f); |
90 assert(pushed == true, "float push failed"); | 90 assert(pushed == true, "float push failed"); |
91 } | 91 } |
92 | 92 |
93 void HSAILKernelArguments::do_int() { | 93 void HSAILKernelArguments::do_int() { |
94 // The last int is the iteration variable in an IntStream, but we don't pass it | 94 // The last int is the iteration variable in an IntStream, but we don't pass it |
105 assert(java_lang_boxing_object::is_instance(arg, T_INT), "arg type mismatch"); | 105 assert(java_lang_boxing_object::is_instance(arg, T_INT), "arg type mismatch"); |
106 | 106 |
107 jvalue jValue; | 107 jvalue jValue; |
108 java_lang_boxing_object::get_value(arg, &jValue); | 108 java_lang_boxing_object::get_value(arg, &jValue); |
109 | 109 |
110 bool pushed = gpu::Hsail::_okra_push_int(_kernel, jValue.i); | 110 bool pushed = Hsail::_okra_push_int(_kernel, jValue.i); |
111 assert(pushed == true, "arg push failed"); | 111 assert(pushed == true, "arg push failed"); |
112 } | 112 } |
113 | 113 |
114 void HSAILKernelArguments::do_long() { | 114 void HSAILKernelArguments::do_long() { |
115 // Get the boxed value | 115 // Get the boxed value |
117 assert(java_lang_boxing_object::is_instance(arg, T_LONG), "arg type mismatch"); | 117 assert(java_lang_boxing_object::is_instance(arg, T_LONG), "arg type mismatch"); |
118 | 118 |
119 jvalue jValue; | 119 jvalue jValue; |
120 java_lang_boxing_object::get_value(arg, &jValue); | 120 java_lang_boxing_object::get_value(arg, &jValue); |
121 | 121 |
122 bool pushed = gpu::Hsail::_okra_push_long(_kernel, jValue.j); | 122 bool pushed = Hsail::_okra_push_long(_kernel, jValue.j); |
123 assert(pushed == true, "arg push failed"); | 123 assert(pushed == true, "arg push failed"); |
124 } | 124 } |
125 | 125 |
126 void HSAILKernelArguments::do_array(int begin, int end) { | 126 void HSAILKernelArguments::do_array(int begin, int end) { |
127 oop arg = _args->obj_at(_index++); | 127 oop arg = _args->obj_at(_index++); |
128 assert(arg->is_array(), "arg type mismatch"); | 128 assert(arg->is_array(), "arg type mismatch"); |
129 if (TraceGPUInteraction) { | 129 if (TraceGPUInteraction) { |
130 tty->print_cr("[HSAIL] HSAILKernelArguments::do_array 0x%08x, is a %s", (address) arg, arg->klass()->external_name()); | 130 tty->print_cr("[HSAIL] HSAILKernelArguments::do_array 0x%08x, is a %s", (address) arg, arg->klass()->external_name()); |
131 } | 131 } |
132 | 132 |
133 bool pushed = gpu::Hsail::_okra_push_object(_kernel, arg); | 133 bool pushed = Hsail::_okra_push_object(_kernel, arg); |
134 assert(pushed == true, "arg push failed"); | 134 assert(pushed == true, "arg push failed"); |
135 } | 135 } |
136 | 136 |
137 void HSAILKernelArguments::do_object() { | 137 void HSAILKernelArguments::do_object() { |
138 if (TraceGPUInteraction) { | 138 if (TraceGPUInteraction) { |
151 | 151 |
152 if (TraceGPUInteraction) { | 152 if (TraceGPUInteraction) { |
153 tty->print_cr("[HSAIL] HSAILKernelArguments::do_object, 0x%08x is a %s", (address) arg, arg->klass()->external_name()); | 153 tty->print_cr("[HSAIL] HSAILKernelArguments::do_object, 0x%08x is a %s", (address) arg, arg->klass()->external_name()); |
154 } | 154 } |
155 | 155 |
156 bool pushed = gpu::Hsail::_okra_push_object(_kernel, arg); | 156 bool pushed = Hsail::_okra_push_object(_kernel, arg); |
157 assert(pushed == true, "arg push failed"); | 157 assert(pushed == true, "arg push failed"); |
158 } | 158 } |
159 | 159 |
160 void HSAILKernelArguments::do_object(int begin, int end) { | 160 void HSAILKernelArguments::do_object(int begin, int end) { |
161 if (TraceGPUInteraction) { | 161 if (TraceGPUInteraction) { |