comparison src/gpu/hsail/vm/gpu_hsail.hpp @ 16533:d5c4bb0039d8

HSAIL: update simulator Contributed-by: Eric Caspole <eric.caspole@amd.com>
author Bernhard Urban <bernhard.urban@jku.at>
date Wed, 16 Jul 2014 11:32:34 +0200
parents e9998e2be7f5
children a29e6e7b7a86
comparison
equal deleted inserted replaced
16532:2dd966b157e8 16533:d5c4bb0039d8
188 jobject donorThreads, int allocBytesPerWorkitem, jobject oop_map_array); 188 jobject donorThreads, int allocBytesPerWorkitem, jobject oop_map_array);
189 189
190 static jboolean execute_kernel_void_1d_internal(address kernel, int dimX, jobject args, methodHandle& mh, nmethod* nm, 190 static jboolean execute_kernel_void_1d_internal(address kernel, int dimX, jobject args, methodHandle& mh, nmethod* nm,
191 jobject donorThreads, int allocBytesPerWorkitem, jobject oop_map_array, TRAPS); 191 jobject donorThreads, int allocBytesPerWorkitem, jobject oop_map_array, TRAPS);
192 192
193 static void register_heap();
194
195 static GraalEnv::CodeInstallResult install_code(Handle& compiled_code, CodeBlob*& cb, Handle installed_code, Handle triggered_deoptimizations); 193 static GraalEnv::CodeInstallResult install_code(Handle& compiled_code, CodeBlob*& cb, Handle installed_code, Handle triggered_deoptimizations);
196 194
197 public: 195 public:
198 196
199 // Registers the implementations for the native methods in HSAILHotSpotBackend 197 // Registers the implementations for the native methods in HSAILHotSpotBackend
209 #else 207 #else
210 typedef unsigned int CUdeviceptr; 208 typedef unsigned int CUdeviceptr;
211 #endif 209 #endif
212 210
213 private: 211 private:
214 typedef void* (*okra_create_context_func_t)(); 212
215 typedef void* (*okra_create_kernel_func_t)(void*, unsigned char*, const char*); 213 /*
216 typedef bool (*okra_push_object_func_t)(void*, void*); 214 * Kernel launch options from okra.h
217 typedef bool (*okra_push_boolean_func_t)(void*, jboolean); 215 */
218 typedef bool (*okra_push_byte_func_t)(void*, jbyte); 216 typedef struct graal_okra_range_s {
219 typedef bool (*okra_push_double_func_t)(void*, jdouble); 217 uint32_t dimension; //max value is 3
220 typedef bool (*okra_push_float_func_t)(void*, jfloat); 218 uint32_t global_size[3];
221 typedef bool (*okra_push_int_func_t)(void*, jint); 219 uint32_t group_size[3];
222 typedef bool (*okra_push_long_func_t)(void*, jlong); 220 uint32_t reserved; //For future use
223 typedef bool (*okra_execute_with_range_func_t)(void*, jint); 221 } graal_okra_range_t;
224 typedef bool (*okra_clearargs_func_t)(void*); 222
225 typedef bool (*okra_register_heap_func_t)(void*, size_t); 223 typedef jint (*okra_get_context_func_t)(void**);
224 typedef jint (*okra_create_kernel_func_t)(void*, unsigned char*, const char*, void**);
225 typedef jint (*okra_push_pointer_func_t)(void*, void*);
226 typedef jint (*okra_push_boolean_func_t)(void*, jboolean);
227 typedef jint (*okra_push_byte_func_t)(void*, jbyte);
228 typedef jint (*okra_push_double_func_t)(void*, jdouble);
229 typedef jint (*okra_push_float_func_t)(void*, jfloat);
230 typedef jint (*okra_push_int_func_t)(void*, jint);
231 typedef jint (*okra_push_long_func_t)(void*, jlong);
232 typedef jint (*okra_execute_kernel_func_t)(void*, void*, graal_okra_range_t*);
233 typedef jint (*okra_clear_args_func_t)(void*);
234 typedef jint (*okra_dispose_kernel_func_t)(void*);
235 typedef jint (*okra_dispose_context_func_t)(void*);
226 236
227 public: 237 public:
228 static okra_create_context_func_t _okra_create_context; 238 static okra_get_context_func_t _okra_get_context;
229 static okra_create_kernel_func_t _okra_create_kernel; 239 static okra_create_kernel_func_t _okra_create_kernel;
230 static okra_push_object_func_t _okra_push_object; 240 static okra_push_pointer_func_t _okra_push_pointer;
231 static okra_push_boolean_func_t _okra_push_boolean; 241 static okra_push_boolean_func_t _okra_push_boolean;
232 static okra_push_byte_func_t _okra_push_byte; 242 static okra_push_byte_func_t _okra_push_byte;
233 static okra_push_double_func_t _okra_push_double; 243 static okra_push_double_func_t _okra_push_double;
234 static okra_push_float_func_t _okra_push_float; 244 static okra_push_float_func_t _okra_push_float;
235 static okra_push_int_func_t _okra_push_int; 245 static okra_push_int_func_t _okra_push_int;
236 static okra_push_long_func_t _okra_push_long; 246 static okra_push_long_func_t _okra_push_long;
237 static okra_execute_with_range_func_t _okra_execute_with_range; 247 static okra_execute_kernel_func_t _okra_execute_kernel;
238 static okra_clearargs_func_t _okra_clearargs; 248 static okra_clear_args_func_t _okra_clear_args;
239 static okra_register_heap_func_t _okra_register_heap; 249 static okra_dispose_kernel_func_t _okra_dispose_kernel;
250 static okra_dispose_context_func_t _okra_dispose_context;
240 251
241 protected: 252 protected:
242 static void* _device_context; 253 static void* _device_context;
243 254
244 // true if safepoints are activated 255 // true if safepoints are activated